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

Add cargo lucifer subcommand #6666

Closed
killercup opened this issue Feb 14, 2019 · 5 comments · Fixed by #12903
Closed

Add cargo lucifer subcommand #6666

killercup opened this issue Feb 14, 2019 · 5 comments · Fixed by #12903
Labels
A-dependency-resolution Area: dependency resolution and the resolver A-new-subcommand Area: new subcommand C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@killercup
Copy link
Member

Add a new subcommand that brings light (get it?) to cargo's dependency resolving, answering questions like

  • Why was that dependency included?
  • Why was that feature on this dependency enabled?
  • Which other versions were considered and why was this one chosen?

Yes, I made this issue because I saw the last issue was number 6665. Feel free to close it as "bad joke".

@killercup killercup added A-new-subcommand Area: new subcommand C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` A-dependency-resolution Area: dependency resolution and the resolver labels Feb 14, 2019
@dwijnand
Copy link
Member

dwijnand commented Feb 14, 2019

I dig the joke 😄

Could this use case be satisfied by documenting something along the lines of RUST_LOG=cargo::ops::resolve=info cargo generate-lockfile?

@spacekookie
Copy link
Member

To propose a bikeshed here, I think it should be called cargo cult

@killercup
Copy link
Member Author

@dwijnand Maybe env RUST_LOG=cargo::core::resolver=trace cargo generate-lockfile if it was more pretty :D

@dwijnand
Copy link
Member

This is how I map log levels:

  • trace I'm deeeep in this module, give me lots of details
  • debug I'm a cargo dev, give me the general-sense detailed log for this module
  • info I'm a cargo user, looking some more info from the operations in this module

But actually, make this detail (or some of it) should be printed by cargo generate-lockfile -v.

@epage
Copy link
Contributor

epage commented Oct 31, 2023

cargo tree I think solves

  • Why was it included (cargo tree -i)
  • Features (cargo tree -e features)

As for "what other versions and why this one", that gets complicated with a lot of information involved. Not really seeing a way around that than env CARGO_LOG=cargo::core::resolver=trace cargo generate-lockfile.

Probably the main thing left is documenting these resources somewhere. Like the section of the documentation on the resolver.

bors added a commit that referenced this issue Oct 31, 2023
docs(ref): Highlight commands to answer dep resolution questions

Previously, in the #6666, the aptly named `cargo lucifer` was suggested for answering resolver questions.

Turns out most of these can be answered now, between logging and `cargo tree`.
This adds troubleshooting tips to help highlight the use of these commands to answer these questions.

Fixes #6666
@bors bors closed this as completed in 086d16c Oct 31, 2023
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-new-subcommand Area: new subcommand C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants