Skip to content
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

Tree during resolution #11060

Open
cavemanloverboy opened this issue Sep 7, 2022 · 1 comment
Open

Tree during resolution #11060

cavemanloverboy opened this issue Sep 7, 2022 · 1 comment
Labels
A-dependency-resolution Area: dependency resolution and the resolver A-diagnostics Area: Error and warning messages generated by Cargo itself. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@cavemanloverboy
Copy link

cavemanloverboy commented Sep 7, 2022

Problem

When resolving dependency issues during e.g. cargo build, it is neither easy on the eyes nor effective to read e.g.

... required by A
... which satisfies dependency A of B
... which satisfies dependency B of C
... which satisfies dependency C of D

especially when the crate names are long and there are many.

Proposed Solution

Instead, a tree structure like

D ~X.X.X
└ C =X.X.X
     └ B ^X.X.X
          └ A X.X.X

conveys the same information more effectively (in my opinion).

Notes

No response

@cavemanloverboy cavemanloverboy added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Sep 7, 2022
@weihanglo
Copy link
Member

This is really an interesting proposal!

I believe this kind of display format is achievable with tweaks in the current ad-hoc implementation. However, Cargo team is working on improving the whole dependency resolution by developing and integrating PubGrub with the Rust version of PubGrub. There is also a dedicated Zulip stream for that if you're interested in dicussions. After adopting PubGrub, we will definitely get better error messages and your alternative format should be feasible.

@weihanglo weihanglo added A-diagnostics Area: Error and warning messages generated by Cargo itself. A-dependency-resolution Area: dependency resolution and the resolver labels Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependency-resolution Area: dependency resolution and the resolver A-diagnostics Area: Error and warning messages generated by Cargo itself. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants