Repository navigation
Verify the declared MSRV in CI, and record the all-features floor - #72
Conversation
Nothing has verified `rust-version` on an ongoing basis. CI builds on `stable`, so the declared floor is never exercised by a job, and a change that raised it would go unnoticed until a user hit it. What the declaration covers is deliberately narrow. Commit 84f279d, which chose 1.85, records the scope: the declared MSRV covers the base crate, while optional feature combinations may require newer compilers through their optional dependencies. This job checks that and no more: the library alone, with default features, which is what was validated at the time. The toolchain is read from `cargo metadata`, so it cannot drift from the manifest. A bare `x.y` is expanded to `x.y.0`, so that the earliest patch release the claim covers is the one tested. Passing the bare version to `rustup toolchain install` would take the newest `x.y.z` instead, which could hide a violation that only the initial release rejects. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
`rust-version` covers the base crate, so it says nothing about builds that turn optional features on. Enabling all features needs a higher floor, and nothing recorded that. The value in this commit is 1.87.0, the newest release below 1.88, so that CI shows this job failing when the recorded floor is wrong. A check only ever seen to pass is not much of a check. The correct value follows immediately, and this commit is expected to be red. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The failing `all-features-floor` job in the preceding commit validates that 1.87.0 is not high enough. The passing job here validates that 1.88.0 is. Together they establish where the floor sits. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR strengthens CI by explicitly validating the crate’s declared Rust MSRV (from rust-version) and separately recording/enforcing a higher compiler “floor” required when building with --all-features, aligning CI checks with the project’s MSRV policy.
Changes:
- Add an
msrvCI job that readsrust-versionviacargo metadata, installs that toolchain, and runscargo check --locked --lib. - Add an
all-features-floorCI job that installs a pinned toolchain version and runscargo check --locked --all-features.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
EliahKagan
left a comment
There was a problem hiding this comment.
The MSRV situation in prodash was confusing me a little bit as I was checking over #71 before merging it, and I think having CI jobs to check compatibility with the declared MSRV, as well as to keep track of and validate the higher version intentionally required for some features, should help with that and also allow Dependabot PRs to be merged with greater confidence when CI is green. See 84f279d for background on how the MSRV is interpreted here.
I iterated on this several times to get it to what I think is a good state and to get the comments and commit message to a point where they were accurate and, I hope, clear. I plan to look this over one more time and see what the Copilot review says, and then merge it.
Written by Claude Opus 5 in Claude Code, on behalf of Eliah Kagan.
CI builds only on
stable, sorust-versionhas never been exercised by a job. It is correct as it stands —cargo +1.85.0 check --locked --libpasses — but nothing would notice if that stopped being true.This PR adds an
msrvjob that checks exactly what the declaration covers: the base crate. That scope is deliberate — the commit that set 1.85 records that the declared MSRV "covers the base crate, while optional feature combinations may require newer compilers through their optional dependencies". Raisingrust-versionto cover them would impose a higher floor on the default feature set, which builds fine on 1.85. So the job runs--libwith default features, reading the toolchain fromcargo metadataso the version tested cannot drift from the manifest.Enabling all features needs 1.88.0, above the declared MSRV. This PR also adds a second job,
all-features-floor, that records and validates that figure.