ci: pin Rust toolchain to 1.95 across CI and local dev#38
Merged
Conversation
CI previously used dtolnay/rust-toolchain@stable, which rolled silently from 1.94 to 1.95 mid-PR and introduced a new clippy lint (clippy::unnecessary_sort_by) that broke green-on-yesterday builds. Pin the toolchain so toolchain bumps are explicit: - Add rust-toolchain.toml at the repo root pinning channel = "1.95" with rustfmt + clippy components. This is the source of truth for local development (rustup honors it automatically). - Replace every dtolnay/rust-toolchain@stable in .github/workflows/ with @1.95.0 so CI tracks the same version. (dtolnay's action does not auto-read rust-toolchain.toml.) - Document the bump cadence in AGENTS.md. Tradeoff: new lints/features no longer surface automatically. We prefer to receive them in a deliberate "bump the toolchain" PR rather than discovering them on an unrelated PR's red CI.
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.
What
Pin the Rust toolchain to 1.95 in both CI and local dev so toolchain bumps are explicit.
rust-toolchain.tomlat repo root (channel1.95, componentsrustfmt+clippy,minimalprofile). Rustup picks this up automatically for contributors.dtolnay/rust-toolchain@stablein.github/workflows/ci.ymlandpublish.ymlwith@1.95.0so CI uses the same compiler.Why
The dependency-upgrade PR (#34) initially failed clippy because
dtolnay/rust-toolchain@stablehad silently rolled from 1.94 to 1.95, which introducedclippy::unnecessary_sort_byand tripped on a pre-existingsort_byinsrc/tui/ui.rs. Pinning makes that kind of bump a deliberate PR (with one focused diff) rather than a surprise on unrelated work.How
The
dtolnay/rust-toolchainaction does not auto-readrust-toolchain.toml, so the workflow tags need to be updated too. Both files now name the same version; AGENTS.md calls out that they bump together.Risk
main). Future Rust releases won't auto-apply.Checklist
cargo buildsucceeds on the pinned 1.95 toolchain locallycargo testpassesdtolnay/rust-toolchain@*reference updated (11 occurrences acrossci.yml+publish.yml)