maybe suggest running `cargo update` if there's a previously selected version conflict
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
I added a new dependency to a project, ran cargo build and got this:
error: failed to select a version for `libc`
all possible versions conflict with previously selected versions of `libc`
required by package `dlopen_derive v0.1.0`
... which is depended on by `dlopen v0.1.0`
... which is depended on by `ooppkcs11rs v0.0.1 (file:///home/keeler/src/ooppkcs11rs)`
previously selected package `libc v0.2.23`
... which is depended on by `ipc-channel v0.10.0`
... which is depended on by `ooppkcs11rs v0.0.1 (file:///home/keeler/src/ooppkcs11rs)`
possible versions to select: 0.2.40, 0.2.39, 0.2.38, 0.2.37, 0.2.36, 0.2.35, 0.2.34, 0.2.33, 0.2.32, 0.2.31, 0.2.30, 0.2.29
My assumption was this was because ipc-channel didn't support libc >0.2.23, but there's no such restriction in ipc-channel's Cargo.toml, so this was just confusing. I ended up removing Cargo.lock and rebuilding, and this worked. A colleague later told me cargo update is the real way to fix this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the dependency conflict with cargo build, then trace the Cargo entry point that formats this version-selection error. Check how Cargo.lock and cargo update are handled in the existing user guidance, and verify that the completed change explains the recovery path without misleading users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100