cargo-outdated icon indicating copy to clipboard operation
cargo-outdated copied to clipboard

Enable resolver=2 for cargo 0.51

Open nickray opened this issue 3 years ago • 9 comments

cargo::core::resolver::ResolveOpts changed, so it's more than just bumping the cargo dependency.

For context, the new resolver https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver no longer needs a cargo-feature activated to work, which the current release (with cargo 0.50) claims. The new resolver does however solve a lot of outstanding issues, which I think will result in a lot of crate updates, which it would be great to discover with cargo outdated :)

nickray avatar Mar 25 '21 15:03 nickray

Will the proposed change fix the following problem when resolver = "2" is present in Cargo.toml?

$ cargo outdated 
error: failed to parse manifest at `my-project/Cargo.toml`

Caused by:
  feature `resolver` is required

  consider adding `cargo-features = ["resolver"]` to the manifest

ArekPiekarz avatar Apr 04 '21 13:04 ArekPiekarz

@ArekPiekarz yes.

astraw avatar Apr 18 '21 10:04 astraw

I am seeing this issue again with cargo 1.54.0

keshrisohit avatar Aug 17 '21 18:08 keshrisohit

Sorry it has taken so long to get back, can you provide me a Cargo.toml that reproduces the issue? Thanks!

deg4uss3r avatar Oct 01 '21 14:10 deg4uss3r

cargo install --version 0.3.2 cargo-binutils Updating crates.io index Installing cargo-binutils v0.3.2 error: failed to compile cargo-binutils v0.3.2, intermediate artifacts can be found at /tmp/cargo-installXkBlyK

Caused by: failed to download object v0.27.0

Caused by: unable to get packages from source

Caused by: failed to parse manifest at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.27.0/Cargo.toml

Caused by: feature resolver is required

consider adding cargo-features = ["resolver"] to the manifest Makefile:31: recipe for target 'firsttime' failed make: *** [firsttime] Error 101

rminnich avatar Oct 21 '21 17:10 rminnich

and just now cargo install cargo-binutils ... Downloaded object v0.27.0 error: failed to compile cargo-binutils v0.3.3, intermediate artifacts can be found at /tmp/cargo-installNPPsaC

Caused by: failed to parse manifest at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.27.0/Cargo.toml

Caused by: feature resolver is required

consider adding cargo-features = ["resolver"] to the manifest

rminnich avatar Oct 21 '21 18:10 rminnich

ah nvm we got a fix

rminnich avatar Oct 21 '21 21:10 rminnich

Maybe this PR should be replaced with a change of MSRV to Rust 1.56+ and switch to 2021 edition which has resolver=2 as default?

nickray avatar Oct 23 '21 12:10 nickray

ah nvm we got a fix

What was the fix?

tayyabmh avatar Nov 08 '21 16:11 tayyabmh