cargo update - show information on why an update could not choose latest version #14856
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.
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 was0.1.16
butcargo update -p <crate>
ended in0.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
The text was updated successfully, but these errors were encountered: