-
-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualize the dependencies as a graph #13283
Comments
To clarify - you can look at internal dependencies (including transitively) today, and you can see your immediate (non-transitive) 3rdparty dependencies today. So it sounds like what you're asking for is to be able to see transitive 3rdparty? |
And, separately, you're asking for |
How can I see as a graph (dot output) internal dependencies? I would also like to see this extends to 3rd party dependencies. |
Today you would take the JSON output of We are also looking into visualization using d3, will announce more when we have something. |
@stuhood @Eric-Arellano Thoughts? Emitting a dot graph seems like a reasonable ask. This is complicated by the question of which targets to show (generators vs generated) and at which granularity. |
I remain convinced that |
There is also the question of how transitive 3rdparty deps fit into this. It is helpful to show them to users (since we know them), but they aren't targets, so probably |
I think that makes sense now. Would the graph only have the target address and target type for each node? You can use peek if you need to create a more custom graph? |
Well, the nodes might not have addresses at all! They might be transitive 3rdparty deps, or "packages" (multiple targets rolled up to the directory level). And yeah I guess we'd put just a descriptive string on each node, and maybe edges would have a bit saying whether they were explicit or inferred. |
@stuhood thoughts on this?
|
Transitive thirdparty makes this challenging, because the only language for which we have transitive thirdparty deps as targets is go, and that's expensive (see #13152 (comment)), or requires I'm not suggesting it (I really don't know what the best solution is here), but: It's maybe interesting to note that because Bazel forces you to declare transitive dependencies (such that you need to re-run something like |
...all that to say: I wonder if we should generate the graph of transitive thirdparty deps from your named resolve lockfile. That might impact the design of named resolves a bit, because we don't have a target namespace per resolve currently. |
Transitive third-party is definitely challenging if we try to model them as targets. My opinion is that we should not do that. If we don't, then we do have ~easy access to them for Python at least. As for rendering But that is still target-centric, and doesn't allow rolling up to things the user actually cares about, e.g., packages. |
It doesn't require that, afaik. It will still render the node(s) for an edge if they are missing, just without any labels. See https://en.wikipedia.org/wiki/DOT_(graph_description_language)#Directed_graphs |
The goal name |
Relatedly: @yoav-orca also had the good suggestion to revive the |
Is your feature request related to a problem? Please describe.
It's very useful to understand the
pants dependencies
structure, specifically when looking at transitive and 3rd party dependencies. Currently, it's not possible to generate the graph view of this information.Describe the solution you'd like
I would like to be able to generate Graphviz graph of the dependency graph.
Describe alternatives you've considered
I have not considered alternatives
The text was updated successfully, but these errors were encountered: