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

purple-plastic-57801

03/08/2023, 5:43 PM
Dumb question: Can one make variables in build files then interpolate strings?
l

loud-laptop-17949

03/08/2023, 5:46 PM
build files are "just" python3 code, so you can probably do what you are trying to do
c

curved-television-6568

03/08/2023, 5:47 PM
only restriction is you can’t use
import
p

purple-plastic-57801

03/08/2023, 6:14 PM
Ahh got it.
Can you used shared values somehow? Like I’m bazel I can load starlark files from other locations.
l

loud-laptop-17949

03/08/2023, 6:30 PM
you can write macros, but also probably put constants in there
c

curved-television-6568

03/08/2023, 6:36 PM
yep, everything that is declared at the module level in a prelude (macro file) is available in all BUILD files
👍 1
5 Views