-
Notifications
You must be signed in to change notification settings - Fork 809
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
fix check-msrv
ci job by resolving to latest compatible dependencies
#4972
Conversation
7f04443
to
ee36bc6
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.
Thanks!
Aside: A possible way to fix this kind of issues once and for all is to set |
That sounds like a great idea, we can also do that with an env var on the command-line inside the job, to avoid affecting non-MSRV jobs:
|
Head branch was pushed to by a user without write access
ee36bc6
to
187a45c
Compare
using `resolver.incompatible-rust-versions = "fallback"`
187a45c
to
7b3a754
Compare
check-msrv
ci job by pinning once_cell
check-msrv
ci job by resolving to latest compatible dependencies
Looks like that works! |
Amazing! I guess it might be possible to drop all the hardcoded versions and simplify the script significantly? |
@davidhewitt Could you enable the full pipeline so I can tests the ci before merging? |
411d75a
to
9b6edf4
Compare
99a3ad0
to
cd75ec8
Compare
noxfile.py
Outdated
# Set the rust-version in the Cargo.toml the generate a compatible lockfile | ||
with open(f"{project}/Cargo.toml", "r") as f: | ||
cargo_toml = toml.load(f) | ||
cargo_toml["package"]["rust-version"] = msrv |
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.
instead of editing this field dynamically, should we just change the Cargo.toml
files?
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.
These examples are also used as template for new projects. So I don't think we should recommend this setting to users.
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.
Indeed. Thank you!
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.
Actually, I'd be up for setting our MSRV in the examples to match our MSRV. Users can then choose to bump their MSRV higher.
Not modifying the Cargo.toml
makes this much more convenient to run locally (which can be useful to reproduce issues with MSRV).
Unfortunately this does not work because some crates do not correctly set their MSRV. |
cd75ec8
to
358ea65
Compare
Thanks for this, I pushed some additional commits to simplify and move this forward to unblock CI 😃 |
Once_cell 1.21 only supports rust 1.70. So forcing a lower version using the nox
set_msrv_package_versions
job.