-
We have multiple repos in which we define packages under the I think that there is a conflict caused by the fact that The error I get is of the following form (I get lots of them and they come in pairs):
I’ve tried adding the following to the root
And internal-db is in Pants’ req file. I’ve made a repository with a reproduction. Thanks in advance 🙂 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Thanks for posting this, and for the easy repro. The issue here is due to this code: That code exists so that we correctly infer In this case, it is causing us to identify Will think about a solution. |
Beta Was this translation helpful? Give feedback.
-
@TalAmuyal Any interest in implementing this? We can guide you |
Beta Was this translation helpful? Give feedback.
-
Almost all the changes would be in src/python/pants/backend/python/dependency_inference/module_mapper.py and its test. Specifically:
|
Beta Was this translation helpful? Give feedback.
-
This has been implemented in #17489, with thanks to @TalAmuyal ! |
Beta Was this translation helpful? Give feedback.
Thanks for posting this, and for the easy repro.
The issue here is due to this code:
pants/src/python/pants/backend/python/dependency_inference/module_mapper.py
Line 149 in 2168bb3
That code exists so that we correctly infer
from
imports that import a symbol defined in a file. E.g.,from my_project.app import App
.In this case, it is causing us to identify
pacifica_db/pacifica/__init__.py
as a potential provider ofpacifica.cli
, even though it isn't.Will think about a solution.