I'm kind of baffled by this error here: ```Excepti...
# general
c
I'm kind of baffled by this error here:
Copy code
Exception: Unmatched glob from the option `--python-setup-requirement-constraints`: "constraints.txt"
Does anyone have incite into this error? It does it both when using the equivalent configuration in pants.toml and when using the mentioned CLI flag
h
Hey Noah! It means that you're telling Pants you have a constraints file at
<build root>/constraints.txt
, but Pants can't find it Do you expect that file to exist?
c
it does exist, let me double check for typos though
oh I think I know the issue. The constraints.txt is in the repo root, which isn't a build root
hmm
h
The constraints.txt is in the repo root, which isn't a build root
Wait what do you mean? Build root == repo root, it's where the
./pants
script is located and (normally)
pants.toml
c
the error's a little misleading, but I think I understand what's going on now. Thanks @hundreds-father-404
Ah, I'm thinking source root
👍 1
h
Oh yeah, those terms are confusing for sure
c
yeah, that file exists, so it's not clear to me why it can't find it
c
doh, it's my .gitignore
yup, that was it
h
K, how would this error message have been?
Exception: Unmatched glob from the option `[python-setup].requirement-constraints`: "constraints.txt"
Does that file exist? If so, check if the file is in your
.gitignore
or the global
pants_ignore
option. Refer to https://www.pantsbuild.org/docs/troubleshooting#pants-cannot-find-a-file-in-your-project
c
that would have been helpful
just "unmatched glob" could mean it expects a wildcard in the filename or something. Even just having "do the file(s) exist?" would help clarify what the error means
h
just "unmatched glob" could mean it expects a wildcard in the filename or something
Yeah that's correct. This is the same error message for when
sources=["bad_*.py"]
in a BUILD file, for example. So we need to use the term "glob" to be accurate
c
Yeah, that makes sense. Just didn't put 2 and 2 together that it meant it couldn't see the file 🙂
h
Cool, I like this rewording a lot. https://github.com/pantsbuild/pants/issues/11629 Only blocker is figuring out how to generate the stable URL to the docs from our Rust code, which is not as trivial as it sounds