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

Clarify MSRV policy #39

Open
svartalf opened this issue Feb 14, 2020 · 4 comments
Open

Clarify MSRV policy #39

svartalf opened this issue Feb 14, 2020 · 4 comments
Assignees
Projects
Milestone

Comments

@svartalf
Copy link

svartalf commented Feb 14, 2020

Latest 0.4.1 release broke support for older Rust versions compared to 0.4.0, for example, accessing enum variants via Self were not available for Rust 1.36.0:

rust-hex/src/error.rs

Lines 26 to 30 in 78359a8

Self::InvalidHexCharacter { c, index } => {
write!(f, "Invalid character {:?} at position {}", c, index)
}
Self::OddLength => write!(f, "Odd number of digits"),
Self::InvalidStringLength => write!(f, "Invalid string length"),

In my case this version of hex were used as a dependency in the Cargo.toml,

[dependencies]
hex = "0.4.0"

and after the new release, cargo automatically started using 0.4.1 as they are assumed to be compatible.

Generally it seems unexpected to update MSRV (Minimal Supported Rust Version) in the patch versions, so it would be nice to clarify your policy on the compiler versions support.
Usual options are either to test specific Rust version in the CI workflow or to put a note in the README file that this project is compatible only with the latest stable Rust version.

EDIT: this discussion might be interesting too.

@KokaKiwi
Copy link
Owner

KokaKiwi commented Feb 14, 2020

Oh shoot indeed, i should've been more careful releasing the 0.4.1 as i didn't think about the used Rust's version (only thought about the API stability as per semver requirements, which is okay but not always enough indeed) :x

As the breaking stuff seems to be easily fixable, i think i'll release a non-breaking corrective version (0.4.2) and yank the 0.4.1 version (to avoid other broken stuff), and stating in the README.md a MSRV for at least an old enough Rust version (maybe 1.36.0 actually) as this lib should be mostly simple and thus wouldn't require an "edging" Rust version (but not too old either)
Along this statement i'll add the MSRV to the Rust's version matrix in the CI so it'd be checked from now on to avoid any future breaking version like this...

PS: also if it's okay for you, i'll gladly do with some feedback about this plan of doing as i never dealt with yank[ed/ing] stuff before, so any tip or comment on this would be greatly valuable for me ^-^

@svartalf
Copy link
Author

Yeah, unfortunately there is no builtin way to force MSRV right now (yet), so at least you can utilize matrix builds to check both for stable and some MSRV version.

Also I'm in no position to ask about some specific Rust version, but considering the amount of the dependant crates and repositories, there is be a chance that sticking with Rust 1.36 will break compatibility to someone.
Naive and dirty way to determine the minimal version would be a bunch of rustup target install {version} && cargo +{version} build commands issued on 0.4.0 tag and going back to some extremely old Rust version, and I fail to find better option for now :(

Crates yanking is pretty easy, the following command should do the thing:

cargo yank --vers 0.4.1 hex

Note that yank subcommand also has the --undo flag, so in case of any typos it will be easy to rollback it back to the "un-yanked" state.

@KokaKiwi KokaKiwi added this to To do in v1.0 via automation Mar 16, 2020
@KokaKiwi KokaKiwi self-assigned this Mar 16, 2020
@KokaKiwi KokaKiwi added this to the 1.0 milestone Mar 16, 2020
@msdrigg
Copy link

msdrigg commented Jun 30, 2021

I just wanted to follow up on this issue. I checked your package using this library https://github.com/foresterre/cargo-msrv

Here are the results for your package. To get each result, I ran git checkout <tag>, and then cargo msrv --bisect

  • For Hex v0.4.3, the msrv is 1.46.0
  • For Hex v0.4.2, the msrv is 1.31.1
  • For Hex v0.4.1, the msrv is 1.37.0
  • For Hex v0.4.0, the msrv is 1.31.1
  • For Hex v0.3.2 and all lower, the msrv is 1.17.0

@Kixunil
Copy link

Kixunil commented Jan 17, 2022

I'd like to express my wish for MSRV to be no newer than 1.41.1 (~2 years old Rust; present in Debian 10 - oldstable). Given that hex is a dependency of many, many crates (also recursively) I think it'd be best to keep it as conservative as reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v1.0
  
To do
Development

No branches or pull requests

4 participants