Add check_msrv job to ci workflow#70
Conversation
|
Thanks, @memark! I'll give this a review once the CI tests are passing. |
|
Hello! I tried messing around with this for a bit cause I saw you were getting an error with no error message. I see you used I tried doing that here but I am still getting some errors (this time with error messages!) and here are the logs. Not sure if this is of any help but I hope so :)
|
|
Thanks, that's an interesting approach! @AntoniosBarotsis Something I struggled/hesitated a bit about is where the "true" MSRV really lives? (If there is one?) I did find out why there where no error messages btw, it was that pesky "set -e" that I blindly copied from the other jobs... After one afternoon of trials in my own repo I finally figured that one out. |
I originally tried to have a source of truth in an |
Understood. I've gone with this approach as well now. I think the workflow should pass now, please allow it to run. |
joshlf
left a comment
There was a problem hiding this comment.
Hey, sorry about the churn on this one, but I just had a realization:
- Looking for all MSRVs is pretty brittle because it relies on the exact format of a number of different files; e.g., I could use a different expression in the
trybuild.rsfiles, and all of a sudden thegreps we're running on those files would just output nothing, which would cause this script to continue to succeed - It would probably be fine to not look at the
trybuild.rsfiles - if we get the MSRV there wrong, all that will happen is that at worst the tests will fail, which we'll notice and fix - We'd like to do
set -eto catch any errors in the script, but we can't so long astests/trybuild.rsdoesn't exist yet - The thing we really need to check for - the thing that would be bad if we missed - is if we're testing for a different MSRV in
ci.ymlthan the one we have advertised in the doc comment insrc/lib.rs
With all that in mind, how would you feel about making the following changes?
- Doing
set -eat the top - Only checking that the MSRV in
src/lib.rsmatches the one inci.yml
|
Sure, I'll make those changes. I will add though that it would have saved me a lot of time and energy if I knew that all that was required was comparing two version numbers (out of the six present in the locations listed in the issue). As for Since the |
Thanks!
Yeah, sorry about that 🙁 Didn't realize that this was the right approach until you'd already put up the code.
In this particular case, we expect
It's up to you. I think you could also just include an MSRV section in |
|
Just pushed a simplified version of the msrv check. Ready for review. |
|
Happy to help out! |
Validate that the MSRV that we document in our public-facing crate documentation is the same one that we test in CI. Closes #39

Add check_msrv job to ci workflow. Checking the MSRV specified in all places mentioned in #39:
When running locally this check works against #60 as well.
Resolves #39.