-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
C-bugCategory: bugCategory: bugCommand-pkgidCommand-updateS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
Problem
cargo update -p package doesn't work and produces a non-working suggestion.
Steps
Workspace archive attached for convenience: w1.zip
- Create a workspace with two libraries,
lib1andlib2. - Add a dependency to
lib1:rand = { git = "https://github.com/rust-random/rand.git" } - Add a dependency to
lib2:rand = { git = "https://github.com/rust-random/rand.git", branch = "0.7" } - Run
cargo checkor anything that generates a lock file. - Run
cargo update -p rand. Output:
error: There are multiple `rand` packages in your project, and the specification `rand` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
https://github.com/rust-random/rand.git#rand:0.7.4
https://github.com/rust-random/rand.git#rand:0.7.4
- Run
cargo update -p 'https://github.com/rust-random/rand.git#rand:0.7.4'
error: There are multiple `rand` packages in your project, and the specification `https://github.com/rust-random/rand.git#rand:0.7.4` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
https://github.com/rust-random/rand.git#rand:0.7.4
https://github.com/rust-random/rand.git#rand:0.7.4
There should be a way to disambiguate between these packages.
Notes
Output of cargo version:
cargo 1.44.1 (88ba85757 2020-06-11)
jameshiew
Metadata
Metadata
Assignees
Labels
C-bugCategory: bugCategory: bugCommand-pkgidCommand-updateS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.