And while I'm on the idea train. I was starting to...
# development
b
And while I'm on the idea train. I was starting to think of adding union "hooks" in common places (pre/post goals, etc...). My reasoning was I want to upstream a plugin, but it's usage (primarily the args) is a bit special to our org. So I want to have a hook telling people how to proceed on failure. Another usage could be the
lint
failure message(s): `(One or more formatters failed. Run
pants fmt
to fix.)` Anywho, food for thought 🙂
p
Python export makes use of `PostProcessingCommand`s to do the virtualenv creation work. The ability to tack on a few more things after that has completed would be very interesting. Right now, changing those requires modifying pants sources. A post export hook could be very nice indeed.
b
The challenge in my mind is how to make these part of the framework, by-default. So we can't forget them or do them in slightly different ways
c
yea I’ve been nurturing the idea of a generic mechanism for hooking into the rule graph at any rule boundary.. just need something that is not going to kill performance or just be a huge foot-bomb
p
Yes. One of the key things pants provides is consistency. So, even the escape hatches should embody consistency.
w
The concept of a
PreGoal
and
PostGoal
would be pretty awesome
👍 1