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

ripe-gigabyte-88964

03/14/2023, 8:35 PM
Can you use variables in
BUILD
files? Or some other wildcard substitution mechanism?
h

high-yak-85899

03/14/2023, 8:37 PM
BUILD files are just starlark so you can define lists and dictionaries and such outside of target definitions.
🙏 1
b

broad-processor-92400

03/14/2023, 8:44 PM
I think
BUILD
files are normal Python (with restrictions on imports). You can share also things across multiple
BUIlD
files via macros: https://www.pantsbuild.org/docs/macros
h

high-yak-85899

03/14/2023, 8:46 PM
you are correct! I was thinking of bazel which uses starlark
That's "officially" documented here
b

busy-vase-39202

03/14/2023, 9:24 PM
Yup, Pants 2 doesn't use Starlark. You've got Python itself at your disposal.