ci: declare the oldest toolchain that works, and hold it there - #110
Merged
Conversation
No crate declared rust-version, so consumers got no MSRV signal and nothing stopped an accidental bump: the next dependency update or the next `if let ... &&` would raise it silently, and the first anyone would hear is a build failing somewhere else. The floor is 1.91, established by building on each candidate rather than guessing. 1.90 rejects Duration::from_mins and from_hours, which the attestation crate's default leeway and TTL are written in terms of. It is set once on workspace.package and inherited by all seven crates. The msrv CI job reads the version out of the manifest and builds with that exact toolchain, so the declaration and the check cannot disagree. It builds rather than tests: the MSRV is a promise about compiling this workspace's code, and the dev-dependencies carry higher floors of their own that no consumer inherits. `task msrv` runs the same thing locally. The manifest is repository content, and on a fork's pull request it is the contributor's content, so the version is matched against a version shape before it reaches $GITHUB_OUTPUT. Closes #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13. (#11, which blocked it, is merged.)
No crate declared
rust-version. Consumers got no MSRV signal, and nothing stopped an accidental bump: the next dependency update or the nextif let ... &&raises it silently, and the first anyone hears is a build failing somewhere else.The floor is 1.91
Established by building on each candidate, not guessed:
Duration::from_mins/from_hoursare unstable, and unstable asconst fn--workspace --all-featurescleanThose two constructors are what the attestation crate's
DEFAULT_LEEWAYand default TTL are written in terms of; they stabilized in 1.91. Set once on[workspace.package], inherited by all seven crates.The check
A declared MSRV that nothing verifies is a claim, not a guarantee. The new
msrvjob reads the version out ofCargo.tomland installs that exact toolchain, so the declaration and the check cannot drift apart — bumping one line bumps both.It runs
cargo build --workspace --all-featuresrather than the test suite, deliberately: the MSRV is a promise about compiling this workspace's code, and the dev-dependencies (nextest, criterion, the libp2p test harnesses) carry higher floors of their own that no consumer inherits. Testing would pin the MSRV to whatever the test tooling needs, which is a stricter and less useful number.task msrvruns the same thing locally, reading the same line.Injection note
Cargo.tomlis repository content, and on a fork's pull request that is the contributor's content. The version is matched against a version shape (grep -oE) before it reaches$GITHUB_OUTPUT, so a crafted manifest cannot smuggle a newline and define step outputs of its own. It is consumed bywith: toolchain:, never interpolated into a shell command.Also
The README states the MSRV under Quick Start and lists
task msrvin the testing table.fmt, clippy, 1079 tests clean, plus a verified
cargo +1.91 build --workspace --all-features.