https://pantsbuild.org/ logo
a

ancient-wall-52690

09/15/2022, 7:09 PM
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

happy-kitchen-89482

09/15/2022, 7:11 PM
Weird. Can you run and compare the output of
./pants roots
in both versions?
a

ancient-wall-52690

09/15/2022, 7:17 PM
I get the same results from both versions. And just to clarify
3rdparty
has never been in the list of roots.
h

happy-kitchen-89482

09/15/2022, 7:18 PM
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

ancient-wall-52690

09/15/2022, 7:19 PM
Nope, the repo root is not in the list.
c

curved-television-6568

09/15/2022, 7:31 PM
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

ancient-wall-52690

09/15/2022, 7:33 PM
hmm.. are you using
poetry_requirements
or
python_requirements
? I’m using poetry
Not sure if it matters, just looking for differences.
c

curved-television-6568

09/15/2022, 7:49 PM
Python
a

ancient-wall-52690

09/15/2022, 8:01 PM
Oddly enough, adding
"/"
to the list of root_patterns fixes the issue, but doesn’t seem like a great solution.
h

happy-kitchen-89482

09/15/2022, 8:12 PM
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

ancient-wall-52690

09/15/2022, 8:25 PM
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

happy-kitchen-89482

09/15/2022, 8:26 PM
I’ll see if I can reproduce this
a

ancient-wall-52690

09/15/2022, 8:42 PM
Thanks! I really appreciate you taking the time to look into it.
h

happy-kitchen-89482

09/15/2022, 9:05 PM
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

ancient-wall-52690

09/15/2022, 9:08 PM
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

happy-kitchen-89482

09/15/2022, 10:52 PM
Thanks
a

ancient-wall-52690

09/15/2022, 10:58 PM
no prob!
h

happy-kitchen-89482

09/15/2022, 11:00 PM
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

ancient-wall-52690

09/15/2022, 11:10 PM
will-do
h

happy-kitchen-89482

09/16/2022, 5:42 PM
thanks! responded there, and will have a fix out shortly
a

ancient-wall-52690

09/16/2022, 5:55 PM
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

happy-kitchen-89482

09/16/2022, 6:10 PM
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

busy-vase-39202

09/16/2022, 6:15 PM
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

ancient-wall-52690

09/16/2022, 7:10 PM
Sure, you can tweet it. My twitter handle is @sitzmar
b

busy-vase-39202

09/16/2022, 9:28 PM
Thank you! I'll schedule it to go out next week.
2 Views