Noticed some weird behavior with pants that I thou...
# general
p
Noticed some weird behavior with pants that I thought I would bring up. I have a messy monorepo, and after running
pants tailor
in the repo I ended up with a
BUILD
file in
.git/logs/refs/remotes/origin
. Contents of the
BUILD
file:
Copy code
python_sources()
We have sort of a complex branch naming scheme, so I'm wondering if
pants tailor
saw a file in that directory that it thought was a python file and thus dumped a
BUILD
file in that directory? I'm wondering how
pants tailor
works its magic under the hood ...
h
Hm,
.git
should be ignored by default. Are you able to share the
GLOBAL
section of your
pants.toml
?
p
Copy code
[GLOBAL]
pants_version = "2.11.0"
pants_ignore = [
    "/infra/deployments",
    "/infra/postgres_maintenance",
    "/alembic",
]
backend_packages = [
    "pants.backend.python",
    "pants.backend.python.lint.black",
    "pants.backend.python.lint.isort",
    "pants.backend.docker",
    "pants.backend.docker.lint.hadolint",
]
h
Ah, use
pants_ignore.add
to preserve our default. Definitely a gotcha
🙏 1
h
Copy code
pants_ignore.add = [...]
to clarify
👍 2