https://pantsbuild.org/ logo
#general
Title
# general
r

ripe-gigabyte-88964

03/24/2023, 7:24 PM
Is it possible to reference an environment variable from a macro? I have a macro that generates a couple targets and I want to include a few additional (non-inferable) dependencies if a certain environment variable is present.
Also, is there a list of all the built-in functions you can reference from a
BUILD
file or macro somewhere?
c

curved-manchester-66006

03/24/2023, 7:43 PM
Is it possible to reference an environment variable from a macro?
Yes with
env()
c

curved-television-6568

03/24/2023, 8:36 PM
Also, is there a list of all the built-in functions you can reference from a
BUILD
file or macro somewhere?
yes, in https://github.com/pantsbuild/pants/pull/18378 is in 2.16.0a0 and 2.17.0.dev0 using
Copy code
pants symbols --help
c

curved-manchester-66006

03/24/2023, 8:37 PM
oh, that help includes my macros. Nice!
😁 1
2 Views