It seems like every couple of weeks someone asks i...
# development
It seems like every couple of weeks someone asks if it's possible to use variables in BUILD files. Would someone please volunteer to identify more places in the docs to emphasize the full capabilities Pants puts at one's disposal, in contrast to systems that use a more limited syntax such as Starlark? It does seem like we haven't driven that point home enough, especially for people used to build systems that offer them less flexibility.
I think the emphasis so far has been for python devs: "Don't think of BUILD files as python. It's a DSL for configuring pants metadata" - the emphasis there is that imports won't work, so a lot of pythonic ways of doing things won't work. But, with StackStorm, I use the fact that BUILD is python as a selling point, because we're a python project, so that makes it feel less daunting to learn.
So, it sounds like we need a balanced message. Something like: You have the power of python, but some pythonic mannerisms won't work like imports. Feel free to use variables. And for variables to be reusable across BUILD files, check out macros (aka prelude).