ci: pin the Rust toolchain to 1.95.0 instead of floating stable#8
Merged
Conversation
CI ran dtolnay/rust-toolchain@stable (and rust-toolchain.toml pinned
channel = "stable"), so the runner tracked whatever stable was current —
which drifted ahead of the Nix-pinned dev toolchain (1.95.0, no rustup
to bump). Newer clippy lints then surfaced only on CI, after push.
Pin both to 1.95.0 so CI and local run the same clippy/rustfmt: set the
channel in rust-toolchain.toml and pass `toolchain: ${{ env.RUST_TOOLCHAIN }}`
(a new workflow-level env, kept in sync with the toml) to every
dtolnay/rust-toolchain step. Bumping the toolchain is now a deliberate
one-place change (both files + the dev environment) rather than implicit
drift on the runner.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
CI used
dtolnay/rust-toolchain@stableandrust-toolchain.tomlpinnedchannel = "stable", so the runner tracked whatever stable was current — which has drifted ahead of this project's Nix-pinned dev toolchain (1.95.0, with no rustup to bump locally). The result: newer clippy lints appeared only on CI, after push (e.g. PR #7 needed a follow-up lint fix).This pins both CI and
rust-toolchain.tomlto1.95.0so they run the same clippy/rustfmt and what passes locally passes on the runner.Changes
rust-toolchain.toml:channel = "stable"→"1.95.0"(with a sync note)..github/workflows/ci.yml: new workflow-levelRUST_TOOLCHAIN: "1.95.0"; everydtolnay/rust-toolchain@stablestep now passestoolchain: ${{ env.RUST_TOOLCHAIN }}(the action'stoolchaininput overrides the ref-inferred channel). Bumping is now a deliberate two-file change kept in sync, not implicit drift.Tradeoff
Pinned to 1.95.0 (matching the dev box), not a newer release: pinning to anything the local Nix environment can't run would just reintroduce the same local-lags-CI gap. To move newer, bump the Nix devshell and these two pins together in one change.
🤖 Generated with Claude Code