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

loud-stone-83419

09/22/2021, 11:57 PM
Hey! I have a dual pants v1 / pants v2 setup. I thought it was all good but as the v2 is growing I just spotted that pants v1 is picking up BUILD.v2. Can I configure v1 not not pick up on that? or should I change the pattern I use for v2 to be BUILDv2?
w

witty-crayon-22786

09/23/2021, 12:03 AM
you can, yea: the
--build-ignore
option applies to BUILD file location: you can set it on v1 to ignore the BUILD file pattern you want ignored
alternatively, you can have v1 completely ignore those files by putting them in
--pants-ignore
Copy code
--pants-ignore="['<str>', '<str>', ...]" (default: "['.*/', '/dist/', '/build-support/virtualenvs/', '/build-support/*.venv/', '/build-support/bin/native/src', '/src/rust/engine/target', '!*.class', '!/pants.pex']")

Paths to ignore for all filesystem operations performed by pants (e.g. BUILD file scanning, glob matching, etc). Patterns use the gitignore syntax (<https://git-scm.com/docs/gitignore>). The `--pants-distdir` and `--pants-workdir` locations are inherently ignored.--pants-ignore can be used in tandem with --pants-ignore-use-gitignore, and any rules specified here apply after rules specified in a .gitignore file.
l

loud-stone-83419

09/23/2021, 12:10 AM
Thank you
🙂
w

witty-crayon-22786

09/23/2021, 12:17 AM
sure thing!
h

happy-kitchen-89482

09/23/2021, 12:22 AM
But yeah, with hindsight BUILDv2 would have been better than BUILD.v2 I guess
ah well
4 Views