Parse AST imports for non-implicit dependencies #183
Replies: 1 comment
-
Hey @kylebjordahl that's an interesting idea, thanks for sharing, it happened to me a couple of times when I was using a shared virtual environment and all the projects available to use in the development environment, and when you build/publish it fails because I forget to add to the I agree with that, we should have both ways, implicit and non-implicit dependencies, but non-implicit sounds like a much easier way to go, it saves a lot of time synchronizing unfortunately, lately, I have not had as much time to work on this project as I expected, but I'm gonna check out this tool. Issue references: #171 |
Beta Was this translation helpful? Give feedback.
-
Hi @lucasvieirasilva! First off, thanks so much for the contributions you've made to the Nx community by developing this plugin! I've had something like this in the back of my head for quite some time, but had not discovered the joy of using poetry instead of older pip solutions.
However, I'm curious what your thoughts are on possibly implementing import tree parsing to detect inter-project imports, rather than simply using implicit dependencies through the pyproject.toml file? I have recently discovered this tool which I believe illustrates a possible technique to achieve this, provided the pyproject (or project.json?) could identify all the entrypoints/submodules within a module.
I believe that we could implement this alongside the existing parsing of the pyproject file to achieve something similar to how the Nx typescript plugin behaves; this would also have the benefit of being a more natural workflow when using a shared virtual environment, as it is dangerously easy to import across a project boundary and not detect that the pyproject lacks that explicitly declared dependency.
Beta Was this translation helpful? Give feedback.
All reactions