I've gone down a rabbit hole and I'm honestly not ...
# plugins
a
I've gone down a rabbit hole and I'm honestly not sure where up is. So context: We have this tool that throws a wobbly if the folder it's told to look at is 'unclean' and has stuff it doesn't expect in there. We also don't use this tool from 'within' pants, and we use pants to package, and then this tool to deploy. Our solution to this was to stick all the package outputs consumed by this tool into a subfolder under
dist/
Originally, we implemented this with an
OutputPathField
subclass that we prefixed a hard-coded folder name into. I decided that hardcoded values r bad and moved it into an option in a subsystem. First pass I just used
AddPrefix
on my Digests, but then my logs from
pants package
were missing the prefix. I then refactored it to call a small rule to prefix the value of the
OutputPathField
... But this seems clumsy. Is there a better way of doing it?
w
sometimes prefixing might be necessary like that, yea… the only thing i see is potentially using a
@rule_helper
rather than a full
@rule
to dedup the code?