indexmap-rs/indexmap

MSRV in manifest is incompatible with dependencies.

Closed this issue · 6 comments

At time of writing, the latest version of indexmap is 1.9.1. It appears that the 1.9 series upgraded its dependency specification for hashbrown to the 0.12 series but did not bump the MSRV in the manifest to 1.56.1 for compatibility (though the MSRV in CI has been bumped). This causes transitive failures when building indexmap with the MSRV in the manifest (the compiler cites hashbrown as incompatible rather than indexmap).

We did bump it to 1.56.1, and then that was reverted to 1.56 in #232.

It does work with hashbrown 0.12.0, but not 0.12.1. They also relaxed their MSRV in rust-lang/hashbrown#343, but that hasn't been published yet.

This causes transitive failures when building indexmap with the MSRV in the manifest

I'm curious, do you have tooling that's trying to check this?

Interesting. I'm seeing a failure in CI using the MSRV of 1.56.0 for a crate that I maintain. The compiler claims that hashbrown can't be built using that MSRV. When I run cargo tree against that branch, it seems that hashbrown is being resolved to version 0.12.1 for indexmap version 1.9.1. Here's the relevant output.

...
[dev-dependencies]
├── build-fs-tree v0.3.0
...
│   ├── serde_yaml v0.8.24
│   │   ├── indexmap v1.9.1
│   │   │   └── hashbrown v0.12.1
...

Any thoughts?

Hmm, it seems I've missed something. 😕 I just tried a local build of a clone of that branch using cargo +1.56.0 build (after cargo update) and it works just fine.

I don't know how that would work with hashbrown v0.12.1, because that declares min 1.56.1. If you really want to use 1.56.0, you can downgrade it, cargo update -p hashbrown --precise 0.12.0, and/or ask hashbrown to publish a new release.

it seems that hashbrown is being resolved to version 0.12.1 for indexmap version 1.9.1.

Cargo's resolver does not consider the crate's rust-version at all yet. It's only used to give an early error, rather than trying to compile a crate that's not going to work. However, I forgot that you can also --ignore-rust-version.

I've dropped CI back to 1.56.0 now that hashbrown 0.12.2 is out.