Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MSRV #35

Closed
wants to merge 2 commits into from
Closed

Update MSRV #35

wants to merge 2 commits into from

Conversation

mriise
Copy link

@mriise mriise commented Apr 29, 2023

toml_edit updated winnow in 0.19.8 which bumps MSRV to 1.64

toml-rs/toml@4bb1066 & toml-rs/toml@9e43da1

could alternatively lock to 0.19.7 and update MSRV in a new patch.


[dependencies]
toml_edit = "0.19"
toml_edit = "0.19.8"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't lock the version. Locking would be =0.19.8. However, I'm not sure this is required here.

The problem is that toml_edit bumped the MSRV in a patch release. The MSRV is also computed based on all deps. Meaning that the MSRV of proc-macro-crate is still 1.60.0, but it gets transitively bumped to 1.64.0 because of its deps.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your MSRV is at least the MSRV of your dependencies. I'd appreciate if we can lock the dependency here to avoid cascading the breaking change up to your users.

proc-macro-crate is a dependency of parity-scale-codec which is integrated into multihash. multihash is a fundamental crate of the libp2p ecosystem and we are trying to minimize breaking changes there at the moment. We treat bumping MSRV as a breaking change.

For 1.0 of multihash, I want to avoid the dependency on parity-scale-codec, simply because it is unnecessarily part of the public API. It doesn't need access to the internals and can be implemented on top. We've chatted about this in paritytech/parity-scale-codec#405 already :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked to pin 0.19.8, but that doesn't help. The problem is that toml_edit itself doesn't has winnow pinned so cargo will still use the latest version.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can build this crate with older Rust versions still. There are no changes needed here, but your application that wants to be able to build with older Rust versions will have to come with a suitable Cargo.lock that pins toml_edit to an old enough version.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More importantly, if you pin it in this crate's Cargo.toml to ==0.19.8 you will break dependency resolution in other crates depending on this, and which actually require features from toml_edit > 0.19.8. It's generally a bad idea to have upper bounds in Cargo.toml (or even worse exact versions).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can build this crate with older Rust versions still. There are no changes needed here, but your application that wants to be able to build with older Rust versions will have to come with a suitable Cargo.lock that pins toml_edit to an old enough version.

Good call, I guess we should just downgrade toml_edit in CI before trying to compile.

@bkchr
Copy link
Owner

bkchr commented Oct 3, 2023

I integrated this into the following pr: #39

@bkchr bkchr closed this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants