Hi, with pants 2.14, I see lot of warnings like. I...
# general
r
Hi, with pants 2.14, I see lot of warnings like. I suppose this is because of namespace packages. What should I do to handle such warnings?
Copy code
15:49:36.77 [WARN] Pants cannot infer owners for the following imports in the target src/package-local/tests/utils/test_nlp.py:

  * tests.resources.fake (line: 5)
In this case
src/package-local
has structure like. We have multiple of such local packages each with their own tests.
Copy code
src/package-local
- package_local
- tests
h
This might be due to source root configuration
What does
./pants roots
show?
To import from
tests.resources.fake
you’d need the parent of
tests/resources/fake.py
to be a source root
r
This is
./pants roots
output
Copy code
pants-plugins
src/package-local
I do add all such local packages as source root
tests
is inside
src/package-local
h
so there is a src/package-local/tests/resources/fake.py?
r
yes
h
huh
Can you create a stripped-down github repo that reproduces the problem?
r
ok, let me try. Thank you!