-
Notifications
You must be signed in to change notification settings - Fork 228
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
Run tests for MSRV, on macOS versions, and fix toolchain #614
Conversation
I don't think it's necessary to run on all the combinations of macOS and toolchains. Running MSRV on just one version of macOS should be fine. |
I've done that under the assumption that there are two configuration parameters to test: the Rust version ( Digging into the PR history, there have been some macOS-version-specific test failures (eg: #600) and many changes to fix issues that came up on new Rust versions. |
I don't know what can push this forward, and I suspect the bots need a poke. However, lets wait for #615, because that PR touches nearly every file in this repository, whereas this only touches one. :) |
Head branch was pushed to by a user without write access
Should be good to merge now. |
I recommend only running |
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.
Should probably change actions/checkout@v2
to actions/checkout@v3
at the same time!
@djc The whole point of having an MSRV is you're warranting the software works with a particular Rust compiler. Omitting unit tests/targets on the MSRV would (in effect) make it not as well supported as Rust While it means there's more work to do in CI (by not skipping steps, and because the MSRV compiler seems to be slower than I'm not advocating for every Rust compiler between MSRV and There are performance optimisations which could be done to this which don't reduce test coverage (eg: using
Done, it looks like that's also causing warnings in the CI log. To reiterate a point I made in the description: right now, the |
My point is that it's extremely unlikely to have the compiler version affect functionality as long as the library can compile against the MSRV. That is, the MSRV is about language/syntax support and about the contents of core/alloc/std. It is very unlikely that changes in the language and those libraries will break your tests. My issue is not CI resources but the MSRV constraints of dev-dependencies brought in by running tests/compiling example targets etc. If you use dev-dependencies in your MSRV job in CI you end up bumping your library's MSRV when your dev-dependencies require it, not when your actual library requires it, which is a bad trade-off. However, this might be moot because right now the crates in this repo don't appear to pull in any dev-dependencies at all. |
I understand now, and that's a fair point as well. I feel like that's something that can be considered when it comes along, where options including abandoning testing on the MSRV, bumping the MSRV, and changing the test/example to meet the existing MSRV would all be on the table. You could also have a test which depends on newer versions of the compiler - and you'd never see the issue when it's never built with |
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.
Could we get just the non-controversial parts of this in place as they would be an immediate improvement?
To make sure my understanding is correct, I believe the only outstanding concern here was that testing on MSRV might fail if Given there are no My interpretation of @djc's last comment was that it was waiting for me to acknowledge the concern, and take action if I felt it was warranted. So:
I have a preference for this PR's approach, but at the end of the day, I acknowledge this isn't my call to make, and this issue doesn't block anything that I want to do, so I have no desire to fuel controversies. 😄 |
Agreed we can move forward with merging this (not that I technically have any authority in this repo). |
#611 added the MSRV to CI, but doesn't run any tests, or run it against the same set of macOS versions as regular tests.
This puts the MSRV in as a build matrix entry for the normal builds, so it'll run the same way for all.
This also switches to
dtolnay/rust-toolchain
, becauseactions-rs/toolchain
is unmaintained and doesn't actually work properly anymore (it'll still build with Rust stable!).CI run: https://github.com/micolous/core-foundation-rs/actions/runs/5514991574