-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update MSRV #35
Conversation
|
||
[dependencies] | ||
toml_edit = "0.19" | ||
toml_edit = "0.19.8" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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 pinstoml_edit
to an old enough version.
Good call, I guess we should just downgrade toml_edit
in CI before trying to compile.
I integrated this into the following pr: #39 |
toml_edit
updatedwinnow
in0.19.8
which bumps MSRV to 1.64toml-rs/toml@4bb1066 & toml-rs/toml@9e43da1
could alternatively lock to
0.19.7
and update MSRV in a new patch.