I just ran into an interesting error when running ...
# general
a
I just ran into an interesting error when running the
package
goal after upgrading from
2.11.1
to
2.13.0
. I’ve searched through my config and build files, but I’m really not sure where this is coming from. No other code changes besides updating the version number in
pants.toml
.
Copy code
NoSourceRootError: No source root found for `3rdparty`
Any suggestions how to troubleshoot this?
h
Weird. Can you run and compare the output of
./pants roots
in both versions?
a
I get the same results from both versions. And just to clarify
3rdparty
has never been in the list of roots.
h
Is the repo root (
.
) in the list?
I wonder if something in 2.13.0 now expects some files under
3rdparty
to have a root for some reason
a
Nope, the repo root is not in the list.
c
I’m on 2.13.0 without issues with our requirements under
3rdparty/..
and it is not part of our roots.
(just to confirm Benjy’s question)
a
hmm.. are you using
poetry_requirements
or
python_requirements
? I’m using poetry
Not sure if it matters, just looking for differences.
c
Python
a
Oddly enough, adding
"/"
to the list of root_patterns fixes the issue, but doesn’t seem like a great solution.
h
So something somewhere needs some file under
3rdparty
to have a source root, even a dumb one
Interesting
what is in the BUILD files under
3rdparty
?
a
Nothing fancy in the BUILD file, just
poetry_requirements()
Copy code
.
├── 3rdparty
│   ├── BUILD.pants
│   ├── pyproject.toml
│   └── python
│       ├── black.lock
│       ├── default.lock
│       ├── flake8.lock
│       ├── isort.lock
│       ├── pytest.lock
│       ├── setuptools.lock
│       └── twine.lock
h
I’ll see if I can reproduce this
a
Thanks! I really appreciate you taking the time to look into it.
h
I wasn’t able to easily reproduce this from the information available. Would you be able to create a dummy public github repo that exposes the issue? Obviously, redact anything that is proprietary etc.
a
Sure, I’ll see if I can strip it down to the essentials.
@happy-kitchen-89482 Here’s the reproduction: https://github.com/rsitzman/pants-sourceroot-error
h
Thanks
a
no prob!
h
OK, I reproduce and I see the issue
Would you mind opening a ticket at https://github.com/pantsbuild/pants/issues/new/choose ? Put the info you posted here there, and the link to the reproduction repo? Then I can respond there/reference it in the fix
a
will-do
h
thanks! responded there, and will have a fix out shortly
a
Thanks so much! Pants has been a joy to work with and I appreciate all the time and effort y’all put in to make it great! 🏆
🎉 3
h
My pleasure!
While we have your attention, could I ask if you’d be able to add your company to https://www.pantsbuild.org/page/who-uses-pants and/or provide us with a quote we can use in our developer relations efforts?
cc @busy-vase-39202 who manages Pants devrel, including testimonials, case studies etc
b
I think "Pants has been a joy to work with and I appreciate all the time and effort y’all put in to make it great!" makes a very nice pullquote. @ancient-wall-52690 would you be okay with that being tweeted? Happy to do that with or without attribution to you, whichever you prefer. (If you have no preference, then my own preference is to give credit where credit is due. :-) But wouldn't do that without consent.)
a
Sure, you can tweet it. My twitter handle is @sitzmar
b
Thank you! I'll schedule it to go out next week.