Suggestion: cargo update before msrv's cargo check
alexkazik opened this issue · 1 comments
In my example I added the dependency trybuild 1.0.85
while running on stable (1.73.0).
And all tests work fine.
The msrv check on github however does fail with:
Run cargo check
cargo check
shell: /usr/bin/bash -e {0}
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
Updating crates.io index
error: failed to select a version for the requirement `once_cell = "^1.9.0"`
candidate versions found which didn't match: 1.17.2, 1.17.1, 1.17.0, ...
location searched: crates.io index
required by package `trybuild v1.0.85`
... which satisfies dependency `trybuild = "^1.0.85"` (locked to 1.0.85) of package `private v0.0.0 (/home/runner/work/private/private)`
Error: Process completed with exit code 101.
As it turns out: once_cell 1.18.0
was added in the Cargo.lock, which is not compatible with the rust 1.58.1 (my msrv).
Running a cargo update
before cargo check does the trick, as it downgrades it:
Run cargo update
Updating crates.io index
Updating once_cell v1.18.0 -> v1.17.2
Or are you running locally the msrv compiler, if yes simply close this request.
I'm happy to write a PR if this is wanted.
Edit: maybe it's not as good idea as I thought because it takes like 5 minutes to do the update (every run).
Yeah, it's actually intentional that we don't run cargo update
except for the scheduled
set of jobs — it ensures that all the jobs test the same dependency closure, and that updates are handled more explicitly. It also (at least in theory) better allows cache sharing between jobs. So I'd like to keep it this way :)