My org is considering using `BUILD.pants` for all ...
# general
My org is considering using
for all of our build files. Renaming existing ones was easy, but I noticed
./pants tailor
was still creating
files even with
build_patterns = ["BUILD.pants"]
(i think this option doesn't actually change anything, but was trying to be explicit). I went looking at the code and found the ability to change this was recently added in I'm currently running
, am I correct that this option won't be usable until
? I tried
and it still isn't available. And I assume I don't want to be using the beta..
Hello! That's correct it isn't usable until 2.8. The latest dev release was 2.8.0.dev3, so that should include the new feature We're hoping/planning to put up the first release candidate either this week or next, so it's close-ish to being stable If you don't want to rely on it in production, you could maybe temporarily use 2.8.0.dev3 to run
./pants tailor
, then downgrade to 2.7
does do something: it teaches Pants what your BUILD file names are when reading them. Whereas the new
./pants tailor
option is what to use when generating them
Thanks Eric. I just saw dev3 in the git tags and can confirm that works with
[tailor]\nbuild_file_name = "BUILD.pants"
. I thought not changing the toml and using
./pants tailor --build-file-name BUILD.pants
would work, but did not for some reason
ūüôĆ 1
And just to clarify, please correct me if I'm misunderstanding, while I was hopeful (before I found
tailor] build_file_name
) that
[GLOBAL] build_patterns
might magically apply to tailor, making it explicit seems fine to me. However even for reading
build_patterns = ["BUILD.pants"]
seems unnecessary because by default it will look for any
I thought not changing the toml and using 
./pants tailor --build-file-name BUILD.pants
 would work, but did not for some reason
that should work… all options should be able to be specified in any of env, config, cli. odd.
./pants tailor --build-file-name=BUILD.pants
with an
, yikes
should work either way though? if the option requires an argument, it expects it
However even for reading BUILD files build_patterns = ["BUILD.pants"] seems unnecessary because by default it will look for any BUILD.{suffix} anyway.
Yeah, not necessary. But would make it explicit and avoid the risk of users accidentally checking in
while I was hopeful (before I found tailor] build_file_name ) that [GLOBAL] build_patterns might magically apply to tailor,
FYI we couldn't do that because it's not clear how to map a pattern like
with a glob into the file name to use
ūüĎć 1
Hey @eager-dress-66405 would you be interested in contributing a PR that improves the docs for these two options to reference each other? It's nothing more than updating these two places
Can do! Will be a good first dip into the codebase
Sweet, thanks Michael! Check out for our contributor guide Tip: you can probably get away without running
and the
hooks. Compiling Rust is really really slow the first time, unfortunately. Because this change is fairly simple, it's fine to not test locally and let CI do that for you Two FYIs with getting the
string to play nicely with terminal sizes, btw: 1. We use implicit string concatenation, like this, because it lets the terminal resize rather than forcing newlines at certain widths
Copy code
   "hello world this is "
   "a single sentence"
1. We use
to start a new "paragraph". Makes it easier to scan docs. What you're adding doesn't relate to what's already there, so should probably be a new paragraph