do BUILD file macros exist in pants v2? if i have ...
# development
a
do BUILD file macros exist in pants v2? if i have a macro that expands to >1 target, is there a way to replicate that in pants v2?
h
CAFO and object still work, but https://pants.readme.io/v2.0/docs/macros is the preferred approach
a
oh! didn't realize
build_file_aliases()
was still accepted!
h
Yes, we kept it because there’s no better alternative to
objects
and CAFO yet. The new macros mechanism isn’t a full replacement But we’ll start erroring when you use
targets
with
BFA
a
i don't actually want to continue using context-aware object factories but it is very useful that they still exist
h
Nor do I. But yeah we still need them for
python_requirements
. Until we have something more powerful, they’ll stick around
a
thanks!!
❤️ 1
just read up on https://pantsbuild.slack.com/archives/C0D7TNJHL/p1593567604396000?thread_ts=1593567460.395800&cid=C0D7TNJHL -- AWESOME interface, this makes macros as easy to write as they should be. pants users can make their own!!! so so excited
h
@average-vr-56795 did a great job with it!
🙏 1
a
❤️