-
Notifications
You must be signed in to change notification settings - Fork 683
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
Ensure that MSRV tests do not regress #1593
Conversation
See #1592 for the demonstration that this approach wouldn've work with the recent bitflags update. One thing I am not sure about if we should have this |
939dcc5
to
31626fa
Compare
Of course #1592 just works, while this one has some failures I can't make heads or tails of... Debuging. |
3e72c93
to
4d00259
Compare
Ok, the last failrue looks like they'll actually fire with the current master, and that I am just unlucky. I've silenced them in the latest commit. I think this PR is good to go, but I can also rebase it on master if someone fixes the deprecations there :D |
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.
This looks ok, but could you please rebase on master to fix the CI problems?
4d00259
to
e27a023
Compare
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.
Didn't take too long for this technique to run into a problem. The build is failing on Redox because redox-syscall-0.2 does not build with recent nightly compilers. And you pulled in that crate because tempfile isn't minimal-versions correct. Could you please increase the version of redox-syscall in Cargo.lock.msrv ?
redox-syscall 0.2.9 should do it. |
When testing with older versions of rustc, there's a CI failure mode when our dependency, which used to be compatible with that Rust version, publishes a new version which can't be compiled using that old Rust anymore. That's pretty unfortunate, as that means that third parties can break our CI without any changes to the code in this repo. To protect against that, let's use Cargo.lock on CI, but only when testing against older versions. For stable Rust, we continue to generate Cargo.lock with freshest dependencies. Implementation wise, we save known-good Cargo.lock as `Cargo.lock.msrv`, and just copy that in every relevant CI job. To get a working `Cargo.lock.msrv`, I run `cargo +nightly generate-lockfile -Zminimal-versions` -- that is guaranteed to support the oldest Rust version we can.
e27a023
to
9735c5f
Compare
Yeah, This case is interesting. I'd say that for nightly we probably shouldn't use minver at all, as it seems easier and more useful to keep latest stuff compatible with the latest nightly. But redox seems to be a unique project which uses older nightly, which is a bummer. Given that our most MSRV-aggressive dependency, Implemented the above plan of not using lock.msrv for redox in the latest commits, lets see if that passes CI. |
Not use minver on nightly? But |
I mean "when testing with nightly compiler version, don't use Cargo.lock.msrv, and rely on default Cargo's behavior of picking maximal versions". That makes sense for nightly, as the situation is generally the opposite: code breaks with newer compiler versions more frequently than with older ones. |
Ok, so the latest version passes the tests! We can keep it, or I can indeed revert to the previous approach and just bump redox-syscall, whatever you prefer more. |
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.
Ok, I can live with sub-par support for Redox. @rtzoeller are you happy with this PR?
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.
The approach seems reasonable to me. @asomers do we need to regenerate the Cargo.lock.msrv file before submitting?
I don't think so. If there's anything wrong with Cargo.lock.msrv, bors won't merge it. bors r+ |
1593: Ensure that MSRV tests do not regress r=asomers a=matklad When testing with older versions of rustc, there's a CI failure mode when our dependency, which used to be compatible with that Rust version, publishes a new version which can't be compiled using that old Rust anymore. That's pretty unfortunate, as that means that third parties can break our CI without any changes to the code in this repo. To protect against that, let's use Cargo.lock on CI, but only when testing against older versions. For stable Rust, we continue to generate Cargo.lock with freshest dependencies. Implementation wise, we save known-good Cargo.lock as `Cargo.lock.msrv`, and just copy that in every relevant CI job. To get a working `Cargo.lock.msrv`, I run `cargo +nightly generate-lockfile -Zminimal-versions` -- that is guaranteed to support the oldest Rust version we can. Co-authored-by: Aleksey Kladov <[email protected]>
Build failed: |
The test failure is due to Clippy getting pickier on the latest nightly . I'll fix it. |
bors retry |
When testing with older versions of rustc, there's a CI failure mode
when our dependency, which used to be compatible with that Rust version,
publishes a new version which can't be compiled using that old Rust
anymore. That's pretty unfortunate, as that means that third parties can
break our CI without any changes to the code in this repo.
To protect against that, let's use Cargo.lock on CI, but only when
testing against older versions. For stable Rust, we continue to generate
Cargo.lock with freshest dependencies. Implementation wise, we save
known-good Cargo.lock as
Cargo.lock.msrv
, and just copy that in everyrelevant CI job.
To get a working
Cargo.lock.msrv
, I runcargo +nightly generate-lockfile -Zminimal-versions
-- that is guaranteed to supportthe oldest Rust version we can.