-
Notifications
You must be signed in to change notification settings - Fork 99
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
Tracking issue for MSRV project #445
Comments
I'd like to help out! I'll take the embedded-hal crate if nobody minds. Edit: Oh, nvm, that already has a tested MSRV of 1.35. Can be ticked in the list. |
Here are the others that already have a MSRV:
|
Put something together to automate this, here are my results so far
All of the "nightly" MSRVs are due to
I have only tested from 1.30.0 to 1.42.0. |
Thanks for checking! I noticed most of those (and embedded-hal) specify the MSRV in their README instead of in the crate documentation, but I think that's just as effective. svd2rust itself doesn't actually say "MSRV" anywhere, though the README does mention it briefly. It might be worth a quick PR to just include the standard wording.
Amazing, thanks! |
True. Would it make sense to update the "Documenting the MSRV" to mention the README instead of lib.rs, so it gets done consistently? Or alternatively, should we update those crates to list the MSRV at both places? |
On the other hand it appears to be common practice in Rust projects to document the MSRV in the README only. Personally I wouldn't expect it to be documented on docs.rs, that is more like a reference to me and I usually have gone through the README on GitHub or crates.io before getting there. That doesn't mean putting it into the crate module docs would hurt, although there is some added maintenance burden of one more place to be updated when the MSRV is increased. |
cortex-m also already documents and tests its MSRV and can be ticked. Though in this case, the MSRV is documented only in the rustdoc, not the README. |
I think historically a lot of rust-embedded crates had very minimal READMEs with pretty much just a link to the documentation; personally I'm all in favour of more fully-fledged READMEs alongside the docs. As @nastevens points out, the README is the first thing a user sees on crates.io and on GitHub, while the documentation is what you see once you're on docs.rs, so I think it makes perfect sense to have the MSRV in the README first and foremost. It is a bit of a pain to have the MSRV duplicated in the README and documentation as well as the CI config file, but maybe worth it for having the MSRV clear in both locations. Anyone else have thoughts on the matter? I'm happy to update the relevant docs to say the MSRV should be documented in the README/both places. |
22: Document and test MSRV 1.31.0 r=almindor a=ra-kete Part of [wg/#445](rust-embedded/wg#445). Co-authored-by: Jan Teske <jteske@posteo.net>
31: Document and test MSRV 1.31.0 r=almindor a=ra-kete Part of [wg/#445](rust-embedded/wg#445). Co-authored-by: Jan Teske <jteske@posteo.net>
436: Use standard wording for the MSRV note r=ryankurte a=ra-kete Part of [wg/#445](rust-embedded/wg#445). svd2rust already has its MSRV documented and tested, but @adamgreig suggested updating it to use the standard wording. Since this is a special case in that the MSRV applies to the generated code, not svd2rust itself, the standard wording doesn't fully apply, so I changed it in a (hopefully) sensible way. An open question is: Should we also document the MSRV of svd2rust itself? Looking at how the CI works, currently it's implicitly guaranteed to be the same version als the MSRV for the generated code, so we could just extend the note in the README to also include svd2rust itself. Co-authored-by: Jan Teske <jteske@posteo.net>
436: Use standard wording for the MSRV note r=therealprof a=ra-kete Part of [wg/#445](rust-embedded/wg#445). svd2rust already has its MSRV documented and tested, but @adamgreig suggested updating it to use the standard wording. Since this is a special case in that the MSRV applies to the generated code, not svd2rust itself, the standard wording doesn't fully apply, so I changed it in a (hopefully) sensible way. An open question is: Should we also document the MSRV of svd2rust itself? Looking at how the CI works, currently it's implicitly guaranteed to be the same version als the MSRV for the generated code, so we could just extend the note in the README to also include svd2rust itself. Co-authored-by: Jan Teske <jteske@posteo.net>
I've updated the list of issues with links to PRs and ticked off those that were merged. I've also opened a PR on cortex-m to change the README there; putting the MSRV in at least the readme seems a good plan. Thanks for all your work so far @ra-kete! |
264: Document MSRV in README r=korken89 a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
264: Document MSRV in README r=korken89 a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
207: Add MSRV note to README r=korken89 a=adamgreig Ref. rust-embedded/wg#445 Co-authored-by: Adam Greig <adam@adamgreig.com>
I've further updated the list with the current PRs and status, thanks everyone! |
Mostly all of the crates that have no PR now make use of unstable features and thus require nightly. Those cannot be assigned an MSRV, obviously. But maybe it would be worth documenting that nightly-dependency in the README? The only exception is cross, which has an MSRV of 1.32, except if it invokes xargo, in which case nightly is required. Not sure how we should deal with that. |
31: Document MSRV 1.26.2 r=nastevens a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
32: Add MSRV 1.34.0 r=nastevens a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
62: Document and test MSRV 1.32.0 r=nastevens a=ra-kete Part of [wg/#445](rust-embedded/wg#445). Co-authored-by: Jan Teske <jteske@posteo.net>
62: Document and test MSRV 1.32.0 r=nastevens a=ra-kete Part of [wg/#445](rust-embedded/wg#445). Co-authored-by: Jan Teske <jteske@posteo.net>
19: Document MSRV 1.23.0 r=nastevens a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
113: Document and test MSRV 1.35.0 r=adamgreig a=ra-kete Part of [wg/#445](rust-embedded/wg#445). This includes two minor changes to the code to lower the MSRV from 1.37.0 to 1.34.0. Co-authored-by: Jan Teske <jteske@posteo.net>
10: Document MSRV 1.31.0 on README r=adamgreig a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
8: Document MSRV r=paoloteti a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
29: Document MSRV on README r=adamgreig a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
8: Document MSRV r=paoloteti a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
3: Document MSRV in README and test on Rust stable r=paoloteti a=eldruin I documented the MSRV in accordance with rust-embedded/wg#445 I also added Rust stable to the build matrix as I think this would be useful. Maybe nightly or beta would also be interesting. Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
3: Document MSRV in README and test on Rust stable r=paoloteti a=eldruin I documented the MSRV in accordance with rust-embedded/wg#445 I also added Rust stable to the build matrix as I think this would be useful. Maybe nightly or beta would also be interesting. Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
3: Document MSRV in README and test on Rust stable r=paoloteti a=eldruin I documented the MSRV in accordance with rust-embedded/wg#445 I also added Rust stable to the build matrix as I think this would be useful. Maybe nightly or beta would also be interesting. Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
3: Document MSRV in README and test on Rust stable r=paoloteti a=eldruin I documented the MSRV in accordance with rust-embedded/wg#445 I also added Rust stable to the build matrix as I think this would be useful. Maybe nightly or beta would also be interesting. Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
207: Add MSRV note to README r=therealprof a=adamgreig Ref. rust-embedded/wg#445 Co-authored-by: Adam Greig <adam@adamgreig.com>
207: Add MSRV note to README r=therealprof a=adamgreig Ref. rust-embedded/wg#445 Co-authored-by: Adam Greig <adam@adamgreig.com>
40: Document MSRV on README r=Disasm a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
207: Add MSRV note to README r=therealprof a=adamgreig Ref. rust-embedded/wg#445 Co-authored-by: Adam Greig <adam@adamgreig.com>
41: Document MSRV 1.32.0 and test it on CI r=posborne a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
433: Change CI to build with Rust 1.32 and document that as MSRV r=reitermarkus a=adamgreig This PR adds a documented MSRV, per rust-embedded/wg#445 As far as I can tell none of the Azure pipelines use Xargo or nightly Rust, so I think this small change should be sufficient, but we'll see what CI makes of it. Co-authored-by: Adam Greig <adam@adamgreig.com>
433: Change CI to build with Rust 1.32 and document that as MSRV r=reitermarkus a=adamgreig This PR adds a documented MSRV, per rust-embedded/wg#445 As far as I can tell none of the Azure pipelines use Xargo or nightly Rust, so I think this small change should be sufficient, but we'll see what CI makes of it. Co-authored-by: Adam Greig <adam@adamgreig.com>
433: Change CI to build with Rust 1.32 and document that as MSRV r=reitermarkus a=adamgreig This PR adds a documented MSRV, per rust-embedded/wg#445 As far as I can tell none of the Azure pipelines use Xargo or nightly Rust, so I think this small change should be sufficient, but we'll see what CI makes of it. Co-authored-by: Adam Greig <adam@adamgreig.com>
433: Change CI to build with Rust 1.32 and document that as MSRV r=reitermarkus a=adamgreig This PR adds a documented MSRV, per rust-embedded/wg#445 As far as I can tell none of the Azure pipelines use Xargo or nightly Rust, so I think this small change should be sufficient, but we'll see what CI makes of it. Co-authored-by: Adam Greig <adam@adamgreig.com>
Update: All done! Any future crates should ensure they have an MSRV defined, but for now this marks the completion of this focus project. Thanks everyone for all your work getting this done! |
264: Document MSRV in README r=korken89 a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
50: Document MSRV on README r=Disasm a=eldruin See: rust-embedded/wg#445 Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
This is a tracking issue for progress on #443.
Here's a link to the project document which explains the project in more detail.
How To Help
We're trying to make sure all WG crates have a well defined Minimum Supported Rust Version (MSRV), which is the oldest version of Rust that can build the crate and run its tests. All our crates should have their MSRV defined in their documentation, and have their CI system automatically run the tests using the MSRV to make sure we don't accidentally break it.
Getting Started
Thank you for your interest in helping! Depending on your skill level, you might find it easiest to just jump in, or you might want more assistance getting going. If you want to just jump in, pick an unclaimed repository from the list below and follow the steps. You can post here that you're working on a project, or just go ahead and open a PR if it's fairly quick.
If you'd like more assistance, please either leave a comment here, or message @adamgreig:matrix.org on the Rust Embedded Matrix, and we'll get you started!
1. Check Current Status
It might be that your repository already has its MSRV documented and/or tested, so it's worth reviewing the steps below quickly to see if this is the case. For repositories where the MSRV is documented and tested, we can tick them off this list with no further work. Please leave a comment here if that's the case!
Otherwise, go ahead and fork the repository from GitHub.
2. Finding the MSRV
First, make sure you can build the crate and run the tests. For most WG repositories, that means running their
ci/script.sh
script:Many of our crates build for multiple targets, which is usually defined in their
.travis.yml
CI configuration file. To run your build for a different target, for examplethumbv6m-none-eabi
:Once the build works on your default Rust toolchain, you'll need to test it on other toolchains. To install a custom toolchain (here 1.40.0), a target for it, and then run tests with it:
Once you have this working, the game is to keep reducing the Rust version until it stops working, at which point you've found the MSRV. It might stop working for a trivial reason that is easily fixed, in which case it could be worth fixing and lowering the MSRV further, but we'll have to decide such issues on a case-by-case basis. We don't expect to go any lower than 1.31 (the first 2018 edition release), but would hope to get at least 1.40 in every case. Ten releases to try!
On the other hand, if this doesn't work for some reason (some projects have more complicated CI setups), please leave a comment here or open an issue on the relevant repository and we'll help figure out what to do.
3. Documenting the MSRV
Once the MSRV is found, add the following snippet to the project's
README.md
,src/lib.rs
, or equivalent documentation:4. Testing the MSRV
To have the CI system run the tests on the MSRV, add the following snippet to the repository's
.travis.yml
configuration file. Note that thematrix
section probably already exists; you want to add a new entry to it for the MSRV test.Many projects test on multiple targets, so add an MSRV entry for each target. If in doubt, seek advice on this issue or on the specific project.
5. Finishing Up
Make a GitHub PR with your changes and link it here. We'll use the PR to review and discuss the change and then get your changes merged in.
Crates Checklist
We'll update this list with a user who's working on that repository, a link to the relevant PR when opened, and tick off crates that are complete.
alloc-cortex-m(nightly-only)cortex-a(nightly-only)msp430-rt(nightly-only)msp430(nightly-only)register-rs(no CI)The text was updated successfully, but these errors were encountered: