You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support building the graph from arbitrary root packages #265
Currently, build_graph requires the passed package to be a top-level package, or, in the case of native namespace packages, the portion. The downsides of this are:
There is no way of building the graph for all portions under a given namespace package - they have to be specified explicitly. (e.g. build_graph("namespace.one", "namespace.two")).
If you want to explore only part of the graph, you still need to build the whole thing. E.g. if you want to analyze mypackage.foo then you need to build mypackage.
Understanding what package to pass can be confusing.
It should be possible to support arbitrary packages:
If we supply a namespace, we can discover all the portions on the graph.
If we supply a (non-portion) subpackage, we can treat imports of modules outside that package as external packages.
As of #267, it's possible to build the graph based on namespaces, not just portions.
I'll leave this ticket open, as it's still not possible to build from subpackages. There's probably not a great deal to do on that, though I think we may need to adjust the API to distinguish between squashed modules and external modules, because it would probably make sense to treat ancestor packages as external.
Activity
seddonym commentedon Dec 10, 2025
As of #267, it's possible to build the graph based on namespaces, not just portions.
I'll leave this ticket open, as it's still not possible to build from subpackages. There's probably not a great deal to do on that, though I think we may need to adjust the API to distinguish between squashed modules and external modules, because it would probably make sense to treat ancestor packages as external.