wide-midnight-78598
06/17/2024, 8:15 PMbroad-processor-92400
06/17/2024, 11:07 PMwide-midnight-78598
06/17/2024, 11:46 PMenv
symbols, etc)
So, in this case, it’s target/compile-time - rather than runtimewide-midnight-78598
06/17/2024, 11:46 PMenv
docs on the website:
https://www.pantsbuild.org/2.21/reference/build-file-symbols/envbroad-processor-92400
06/18/2024, 10:47 AMenv
and its docstring is defined at https://github.com/pantsbuild/pants/blob/main/src/python/pants/engine/internals/parser.py#L218-L220wide-midnight-78598
06/18/2024, 12:12 PMenv
docs". The real information is here (as a lot of grepping just found): https://www.pantsbuild.org/2.22/docs/using-pants/key-concepts/targets-and-build-files#environment-variables
I wonder if there is a way we can do backlinks in our docs - so that we link to the "reference" item, but reference items can link back to "used in docs" kinda thingwide-midnight-78598
06/18/2024, 12:31 PMenv
is accessible to them as well - which is fantastic.
def my_macro(**kwargs) -> None:
archive(
name="my-macro-archive-env",
description=env("VALID", "This is my fallback string"),
format="zip"
)
archive(
name="my-archive-no-valid-env",
description=env("INVALID"),
format="zip"
)
archive(
name="my-archive-fallback-env",
description=env("INVALID", "This is my fallback string"),
format="zip"
)
archive(
name="my-archive-env",
description=env("VALID"),
format="zip"
)
my_macro()
% VALID="Passed in at command line" pants list --documented :: ⎇ noop*
u-boot-builder:my-archive-fallback-env
This is my fallback string
u-boot-builder:my-archive-env
Passed in at command line
u-boot-builder:my-macro-archive-env
Passed in at command line
curved-television-6568
06/18/2024, 5:05 PMwide-midnight-78598
06/18/2024, 5:08 PMcurved-television-6568
06/18/2024, 5:12 PMwide-midnight-78598
06/18/2024, 5:14 PMenv
central over here 🙂
I got confused when I ran peek, and I was missing a bunch of cache, because GITHUB_* isn't set on my local machinebroad-processor-92400
06/18/2024, 7:14 PMwide-midnight-78598
06/18/2024, 7:16 PMbroad-processor-92400
06/18/2024, 7:19 PMwide-midnight-78598
06/18/2024, 7:20 PM