the only project I'm having trouble with is one th...
# general
c
the only project I'm having trouble with is one tha lives a directory "lib", is there any naming restriction?
h
Hm, what is the issue specifically? Pants places no restrictions on what you name folders, other than avoiding some characters like
@
. What version of Pants are you using (
./pants --version
)? Likely this is an issue with source roots. See https://pants.readme.io/docs/source-roots
c
I'm using 1.29.0rc0 - I tried to change the
root_patterns
but no luck
It looks like there was a line
lib/
in .gitignore added after the directory
lib
was created. Removing that line fixes the issue 🎉
đź‘Ť 1
does pants now use this file when inspecting the repo?
h
Ah, good find! Indeed, Pants does use your top level gitignore to populate the option
pants_ignore
. You can turn this off by setting
pants_ignore_use_gitignore = false
in the
GLOBAL
section of pants.toml
Alternatively, you can override a specific value by setting
pants_ignore.add = [“!my_pattern”]
c
thanks, that's very helpful 🙂
❤️ 1
h
I’ll look on Monday at where this would be appropriate to add to the docs
đź‘Ť 2
s
Finding this thread just solved a confusing issue for my build, plus1 on the docs 🙂
🎉 1
h
Awesome! @salmon-television-63321 was your issue that a folder was being ignored that you didn’t expect?
Okay updated: 1) Added a brief “tip” to the Gitignore page, which is the ~5th page we expect new users to see https://pants.readme.io/docs/gitignore. I didn’t want to go into detail because it’s an advanced topic. 2) Added a new entry to the Troubleshooting page: https://pants.readme.io/docs/troubleshooting#pants-cannot-find-a-file-in-your-project Any feedback welcome on this! 🙂
s
Thanks @hundreds-father-404, my context was an upgrade from 1.18 to latest plus a switch to mixed mode builds. I have a jarfile from a jvm build being treated as a resource for a python build, which worked in 1.18 even with it .gitignore’d (maybe accidentally?) but fell off the wagon toward the end 🙂
đź‘Ť 1
h
Got it, that makes sense why that would stop working. Glad to hear you’re upgrading - let us know if we can help with anything else and if you have feedback or feature requests!
s
đź‘Ś thanks again, and the new docs look great!
❤️ 1