-
Notifications
You must be signed in to change notification settings - Fork 101
Re-evaluate WG wide MSRV policy #427
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
Comments
Current policy is: https://github.com/rust-embedded/wg/blob/master/ops/msrv.md |
Currently our policy suggests the highest allowable MSRV is stable-1. Given the stability we want to maintain with the upcoming 1.0 releases, I think we should consider changing this to stable-2 or stable-3. The current policy has a separate MSRV per crate. This is probably the only manageable approach, but it's worth bearing in mind that many of our crates depend on each other, which will impact MSRVs: bumping r0 would require also bumping cortex-m-rt, for example. I suggest we amend the policy to include something along the lines of:
Additionally @jonas-schievink mentioned that we might want to reconsider making updating the MSRV a breaking change requiring a semver bump; apparently this is not commonly done in other Rust projects. |
Most of these suggestions seem pretty reasonable to me. A few notes:
|
The same happened with |
443: Add project proposal for documenting and testing MSRV in all WG crates r=jamesmunns a=adamgreig As we discussed in the last meeting, I'm proposing a new project on making sure all our crates have a documented and tested MSRV. This would be an ideal project for newcomers to help out with, as the work to do is fairly well defined but has an immediately useful impact on our projects' stability. [(rendered)](https://github.com/rust-embedded/wg/blob/project-msrv/projects/in-progress/0443-test-msrv.md) For reference, here are the discussion points: * Do we want to also include a MSRV badge in repository READMEs? See [rand](https://github.com/rust-random/rand) for an example. * Do we want to update the WG policy to stable-2, i.e. [#427](#427)? Co-authored-by: Adam Greig <[email protected]>
Here's my hot take. Careful not to burn yourselves. I don't care about old versions of stable Rust. The compiler is free. The compiler moves fast, on a regular cadence. Updating is relatively painless. I posit that anyone who does care about old versions of stable Rust is in a commercial environment, in which case, I invite them to a) So what I would do is:
TL;DR: Embrace the release train. Forget about the past. Set the MSRV to |
I wonder if this is true? What about users that rely on their OS's package manager for their Rust install? Debian stable currently includes Rust 1.34, which is pretty old. There might be reasons for not wanting to switch to rustup to get newer versions (though not sure which these might be). On the other hand, if we want to support such Debian-stable users, our "maximum MSRV" (MMSRV?) would need to be 1.34. Committing to If the consensus is that we don't care about supporting old Rust versions, then I agree setting the MSRV to always be One more thought: What specifically is the reason to limit ourselves to |
Debians rust version has more to do with the fact, with which compiler version the rust packages are build for that specific Debian release. This is important for users and developers of rust programs packaged for Debian. If I developed on Debian, I would install the latest rust compiler via rustup anyways and as embedded-rust is not developing user-software, which is planned to be packaged for Debian, this should not be our concern. |
I didn't go with stable simply because it takes a little time for the new version to be downloaded by everyone and because it's useful to let newly stabilised features settle for a while (in case the beta period didn't find all the bugs). I'm relaxed about |
I'm a fan of aggressive MSRV, but I'll note there's another reason why people might be on older releases of Rust: because they're using experimental codegen backends created by people who who don't have time to continuously update their rustc forks to the latest Rust release. Ideally people would upstream all of these backends, and on a longer scale that's hopefully what happens, but that's also a lot of work. |
For libraries, a fixed MSRV is very important if users of the library might want to guarantee a fixed MSRV. Authors of a GUI application that want the application to be easy to build for Debian will hate it if libraries require Rust versions newer than what the Debian build system offers. I'm the maintainer of tealdeer which is also packaged in some Linux distributions. I really try hard to guarantee a fixed MSRV, but it's a royal pain if libraries suddenly require newer Rust features (often accidentally) in a patch version. Essentially, every time I run For libraries purely targeted at embedded, the situation is probably different. Users of HALs and PACs will not care much about the version of Rust provided on Debian. For development tools (like itmdump) and generic no-std libraries (like heapless) this might not be the case though. If Debian wants to package itmdump, requiring a very recent version of Rust might be inconvenient. |
Debian stable specifically. Testing and Unstable are on 1.42. Stable is on 1.32. I'm not sure how many new packages get added to stable after release ... are there many? I think if anyone is building with rustc on Debian, I kind of expect them to use the crates that are packaged with Debian. If ripgrep, say, suddenly gets an MSRV bump because a library it uses now uses a new feature, that isn't an issue for a Debian Stable user who runs "apt install ripgrep", because the version of ripgrep in Stable will always be a version that builds with the rustc in Debian Stable. If you took the Debian rustc and tried to build ripgrep master, I think it's only fair to expect issues. The same applies to using RHEL in general (hence Software Collections, but never mind that). If you want to build your own software, I would tell Debian Stable (and RHEL) people to get their own compiler - the one in the OS is for the OS and is deliberately out of date.
Yes, this is a pain. But I don't think MSRVs set back to whichever OS has the oldest and crustiest version of rustc and major version bumps every time we want to use a 12 month old feature that isn't in the 18 month old compiler is a price that's fair to inflict on the entire community - especially those who are primarily building Embedded Rust software that isn't packaged for Linux distributions. Perhaps to make things a little less painful for those who target old OSes, we could teach rustup about the version that Debian Stable is shipping. At least then for those who do want to use that as their MSRV, there would be an easy way to get rustup to fetch it and build something with it. |
Oof yeah. Again, I appreciate it sucks for them but again I don't know if avoiding stabilised features for 18 months is a price worth paying. |
Having a stable MSRV per semver version does not necessarily mean that you need to target an ancient version of Rust, it just means that the MSRV will not change in a patch release (and ideally not even in a minor release). I wasn't complaining about people raising their MSRV, that's perfectly fine. I was complaining about MSRVs being raised in patch releases, usually without even a mention in the changelog. A stable MSRV means that as long as a user of the library does not bump the version in But again, in the embedded ecosystem things may be different and using a moving rustc target may be perfectly fine. I don't have a strong opinion in this case, just wanted to add some counterpoints to "only enterprise customers will care about MSRV". |
I've opened a Draft RFC here: #449 |
Please see #523 for an alternate policy proposal that was ultimately adopted. |
Closing this as part of the 2024 triage. |
No description provided.
The text was updated successfully, but these errors were encountered: