killercup / cargo-edit

A utility for managing cargo dependencies from the command line.
http://killercup.github.io/cargo-edit/
MIT License
3.01k stars 144 forks source link

error: failed to select a version for the requirement `clap = "^4.3.10"` #861

Closed octavei closed 11 months ago

octavei commented 11 months ago

env: cargo 1.57.0 rustc 1.57.0 comand:

cargo build --release --bin cargo-add

err info:

➜  cargo-edit git:(master) ✗ cargo build --release --bin cargo-add
    Updating crates.io index
error: failed to select a version for the requirement `clap = "^4.3.10"`
candidate versions found which didn't match: 3.2.25, 3.2.24, 3.2.23, ...
location searched: crates.io index
required by package `cargo-edit v0.12.0 (/Users/octavei/Desktop/rs-test/cargo-edit)`
epage commented 11 months ago

That version of clap requires a newer version of cargo and is using features from cargo that it can't even report the version issue.

See also https://github.com/rust-lang/cargo/issues/10623