https://pantsbuild.org/ logo
#development
Title
# development
b

bitter-ability-32190

04/10/2023, 6:12 PM
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

proud-dentist-22844

04/10/2023, 6:30 PM
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

bitter-ability-32190

04/10/2023, 6:34 PM
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

curved-television-6568

04/10/2023, 6:40 PM
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

proud-dentist-22844

04/10/2023, 6:42 PM
Yes. One of the key things pants provides is consistency. So, even the escape hatches should embody consistency.
w

wide-midnight-78598

04/10/2023, 6:58 PM
The concept of a
PreGoal
and
PostGoal
would be pretty awesome
👍 1