-
Notifications
You must be signed in to change notification settings - Fork 105
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.rs
files, and all of a sudden thegrep
s 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.rs
files - 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 -e
to catch any errors in the script, but we can't so long astests/trybuild.rs
doesn'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.yml
than 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 -e
at the top - Only checking that the MSRV in
src/lib.rs
matches 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for this, @memark! Just a few nit-pick comments, but this looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.