Closed matthiaskrgr closed 6 years ago
Cargo was migrated to clap
recently: https://github.com/rust-lang/cargo/pull/5152
cargo-outdated
and cargo-edit
are another victims here.
EDIT: clap
issue: https://github.com/kbknapp/clap-rs/pull/1215
That means that should be resolved when someone decides to update cargo
's clap
dep (why they can't just specify down to minor as opposed to to patch will forever remain a mystery to me). Will close then.
@matklad is aware of this issue, and it's fixed in upstream clap. So I'm assuming this will be fixed in the next nightly version of cargo.
I think this issue could be closed, because it has nothing to do with cargo-update
per se. The PR to rust is waiting for bors.
why they can't just specify down to minor as opposed to to patch will forever remain a mystery to me
So, we specify the requirements for clap version here: https://github.com/rust-lang/cargo/blob/d10ec661b06420654bbc4ed0ccd32295698aa1dc/Cargo.toml#L56. Note that clap = "2.31.2"
means the same as clap = "^2.31.2"
. That is, even if you specify patch version, Cargo would use a later patch, if available. The reason why we specify patch version is because we want to explicitly forbid 2.31.1
just in case.
Note, however, that this is only requirement, the actual version of clap, used by production builds of Cargo is specified in the lockfile in the rust-lang/rust repository: https://github.com/rust-lang/rust/blob/6bfa7d02d6713acd15ead20c199b808e85031f9e/src/Cargo.lock#L187
We need that lockfile, as usual, to make sure that the builds of rustc/cargo/rls and others are reproducible. For example, just updating from clap 2.31.1 to 2.31.2 would have broken a single test in Cargo which, accidentally, relied on the previous wrong behavior.
Hopefully this clarifies situation a bit about version of packages, used in Cargo :)
And sorry once again for this disruption!
Ah, thanks for clearing up how semvers degenerate into semver reqs!
Closing since relevant external issue just closed.
Quoth @kbknapp:
This has finally made it into the latest nightly
cargo
build too - so the fix isrustup update nightly
.
does work, however
does not (I'm 99% sure it did before! :/) I'm not sure what the error is here...
Cargo had some changes to its cmdine arg parsing, maybe this broke something here?
It'd kind of weird though, I have my own cargo plugin "cargo-cache" which I can still use via "cargo cache", I don't understand why cargo install update would break but cargo cache would not.