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

cargo update - show information on why an update could not choose latest version #14856

Closed
cemoktra opened this issue Nov 25, 2024 · 1 comment
Labels
A-dependency-resolution Area: dependency resolution and the resolver C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@cemoktra
Copy link

Problem

I wanted to solve an advisory using cargo update -p <crate>, the command updated the dependency a bit, but not to the version where the advisory was fixed, e.g. latest version was 0.1.16 but cargo update -p <crate> ended in 0.1.12.

As this what not a direct dependency it was hard to figure out which other indirect dependency would need an update. I tried to figure out the dependencies using cargo tree -g <growing number> -i -p <crate>@<version> but with growing depth it was impossible to track this down.

Proposed Solution

In case cargo could not update to the latest version, print the dependency that pinned the version to this specific version.
An alternative might be adding some filtering to cargo tree that allows for example to filter out all dependency that are part of the workspace as i knew it was not a direct dependency.

Notes

No response

@cemoktra cemoktra added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Nov 25, 2024
@epage epage added the A-dependency-resolution Area: dependency resolution and the resolver label Nov 25, 2024
@epage
Copy link
Contributor

epage commented Nov 25, 2024

This sounds like a duplicate of #7929 and closing in favor of that. If there is a reason for us to keep this open on its own, let us know!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
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 C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

2 participants