ostree-rs-ext icon indicating copy to clipboard operation
ostree-rs-ext copied to clipboard

cargo: bump to clap v4

Open lucab opened this issue 3 years ago • 3 comments

RFC: clap v4 comes with several additional deprecations, which I haven't yet looked at. We can either do it here, or leave it for later.

lucab avatar Sep 29 '22 13:09 lucab

error: failed to select a version for the requirement `clap = "^4.0"`
candidate versions found which didn't match: 3.2.22, 3.2.21, 3.2.20, ...
location searched: crates.io index

This is a funny new cargo error that I've never seen before. It seems to only happen on our old/pinned toolchains (1.58.1).

lucab avatar Sep 29 '22 15:09 lucab

I think it's because cargo is skipping the dependency since our MSRV doesn't match the rust= in the crate.

cgwalters avatar Sep 29 '22 15:09 cgwalters

I think this is because of this new syntax for Cargo features that clap is using: https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html#new-syntax-for-cargo-features Our pinned toolchain is older than 1.60 so it doesn't understand it.

lucab avatar Sep 29 '22 16:09 lucab

Hmm, I am not sure how to get clap_mangen to work in the new flow. Seems we can't call clone() on a Command anymore - clap panics about a duplicate name.

cgwalters avatar Dec 06 '22 14:12 cgwalters

I'm not seeing any new deprecations now...it seems likely that clap upstream now as of 4.2 backed off that?

cgwalters avatar May 18 '23 21:05 cgwalters