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

MSRV #12

Open
dylni opened this issue Apr 3, 2021 · 4 comments
Open

MSRV #12

dylni opened this issue Apr 3, 2021 · 4 comments

Comments

@dylni
Copy link

dylni commented Apr 3, 2021

Hello nvzqz!

Does this crate have a MSRV (minimum supported rust version)? This crate would be useful to integrate into normpath, but it will be difficult without a MSRV.

Also, which versions can increase the MSRV? Do you allow major, minor, and patch versions to rely on newer Rust features?

@nvzqz
Copy link
Owner

nvzqz commented May 25, 2021

Sorry for the late response. I don't have an MSRV policy yet.

I'm leaning heavily towards 1.51.0 because I'd like to create an NSFastEnumeration iterator that takes advantage of const generics where the caller can choose their own size/performance trade-off.

Otherwise, the informal MSRV is 1.48.0 because I have pending changes that use intra-doc links.

My policy across all my Rust crates is that an MSRV change is a breaking change. So once this crate becomes 1.x, an MSRV bump will lead to 2.x.

@dylni
Copy link
Author

dylni commented May 25, 2021

Thanks for sharing your thoughts!

My crate is still in 0.x, so this will be helpful for planning out its MSRV policy.

@mcountryman
Copy link

For discovery https://github.com/foresterre/cargo-msrv works pretty well. The crate rand runs a gh action to test for msrv like so https://github.com/rust-random/rand/blob/2732f2d6a8bff48c730d396a79c5c56bf4bcd5ba/.github/workflows/test.yml#L50 . It might be worth exploring providing proof of MSRV for crate consumers.

I went deep down the gh action rabbit hole here if you wanna take a look.

@dylni
Copy link
Author

dylni commented May 27, 2021

For discovery https://github.com/foresterre/cargo-msrv works pretty well.

@mcountryman Thanks for the suggestion, but I prefer to avoid relying on versions that happen to be supported when possible. Some crates indicate that even if they work on older versions, their MSRV is higher (e.g., doc_item).

The crate rand runs a gh action to test for msrv like so https://github.com/rust-random/rand/blob/2732f2d6a8bff48c730d396a79c5c56bf4bcd5ba/.github/workflows/test.yml#L50 . It might be worth exploring providing proof of MSRV for crate consumers.

This is a great idea that I use for my crates too. The part that's missing is support for the minimum version in Cargo.

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

No branches or pull requests

3 participants