cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Tree during resolution

Open cavemanloverboy opened this issue 3 years ago • 1 comments

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 avatar Sep 07 '22 21:09 cavemanloverboy

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 avatar Sep 07 '22 23:09 weihanglo