indexmap-rs/indexmap

Broken downstream builds with Edition 2018 compilers

Closed this issue · 2 comments

Hi. It seems that by upgrading the compiler edition to 2021 within a semver major version (v1.8 -> 1.9) you broke the build for folks using the package with a 2018 compiler. In my case, this library is brought in by serde_json, and even trying to lock it back to an earlier version doesn't fix the problem, due to its dependency resolving to the latest v1.x of this package in either case.

I think I have a workaround for the moment, so it's not critical, and I'm not sure of the proper thing to do about major semver's and Edition updates, so I asked on the Rust Forum.

But I figured I'd mention it here.

I know it's not ideal, but the alternative is that we'd have to force everyone to go through dependency churn any time we need to increase our MSRV, which has a stagnating effect of not allowing us to update at all. Hopefully someday, Cargo will be able filter on the [package] rust-version during dependency resolution, choosing older versions rather than just making it an error.

The workaround that I would recommend is adding your own dependency on indexmap = "~1.8", and this will affect your entire dependency graph.

Yes, thanks, I just figured out that manually including indexmap fixes it. I didn't know you could do that.

But I agree. It's not ideal.

Either way, thanks for the insanely quick reply.