Hi, I have a project structure as below: `Tree of...
# general
a
Hi, I have a project structure as below:
Tree of: /root/project
.
|__apps
| |__app1
| |__app2
| |__app3
And I have the
root_patterns
declared as:
[source]
root_patterns = [
"/apps/app2",
"/apps/app3",
]
But the command
./pants tailor ::
is generating
BUILD
files in
apps/app1
too. I don’t want that to happen. Could anyone please help?
e
See the various ignore options here: https://www.pantsbuild.org/docs/reference-tailor
In short, source roots does not restrict where Pants looks to find things, it just defines path offsets.
a
Ok, I added the subsystem tailor in my
pants.toml
file:
[tailor]
ignore_paths = [
"/apps/app1",
]
But it threw an error that said:
ValueError: Absolute paths not supported: "/apps/app1"
h
Those paths should be relative to the repo root. An absolute path would make no sense in a checked in file that is intended to be portable across clones of the repo.
a
Ok, I just tried
apps/app1/**
and the
tailor
goal worked as intended.
Thanks!
a
Hi had a similar issue recently. and started with the tailor one but thanks to some help from the community changed mine to be
Copy code
[GLOBAL]
pants_ignore.add = [
 "/folder-to-ignore",
 "/file_to_ignore.txt",
"/another_file_to_ignore.py",
]
with this I was able to remove the
[tailo[
block