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

aloof-angle-91616

07/01/2020, 1:37 AM
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

hundreds-father-404

07/01/2020, 1:40 AM
CAFO and object still work, but https://pants.readme.io/v2.0/docs/macros is the preferred approach
a

aloof-angle-91616

07/01/2020, 1:41 AM
oh! didn't realize
build_file_aliases()
was still accepted!
h

hundreds-father-404

07/01/2020, 1:42 AM
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

aloof-angle-91616

07/01/2020, 1:43 AM
i don't actually want to continue using context-aware object factories but it is very useful that they still exist
h

hundreds-father-404

07/01/2020, 1:44 AM
Nor do I. But yeah we still need them for
python_requirements
. Until we have something more powerful, they’ll stick around
a

aloof-angle-91616

07/01/2020, 1:44 AM
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

hundreds-father-404

07/01/2020, 6:34 PM
@average-vr-56795 did a great job with it!
🙏 1
a

aloof-angle-91616

07/01/2020, 6:34 PM
❤️