cargo update -p bar
where bar
is patched can partially unpatch bar
#8355
Labels
A-dependency-resolution
Area: dependency resolution and the resolver
A-patch
Area: [patch] table override
C-bug
Category: bug
Command-update
S-triage
Status: This issue is waiting on initial triage.
Problem
If there is a
[patch]
for something at version 0.1.0, and you need to update the[patch]
to version 0.1.1, but there is also a 0.1.2 available in the registry,cargo update
is too aggressive and will pick0.1.2
. This can lead to a somewhat corrupt state where there are two different semver compatible versions in the lockfile.See rust-lang/rust#73238 (comment) for a real-life example.
Note: This isn't specific to
cargo update
. Implicit updates fromcargo build
also cause this.Steps
Repro as a cargo test:
Notes
cargo 1.45.0-nightly (40ebd52 2020-06-01)
The text was updated successfully, but these errors were encountered: