Repository navigation
build: pin Rust toolchain to 1.95.0 and bump MSRV to match - #489
Conversation
Pin `rust-toolchain.toml` and the four `dtolnay/rust-toolchain@stable` refs in `ci.yml` (fmt, clippy, doc, test) plus the two in `release.yml` (release, build-binaries) to the same exact version. The MSRV pin (`@1.85.0`) stays untouched — distinct knob, distinct job. Update dependabot to ignore only the MSRV version (`versions: ["1.85.0"]`) so dependabot continues to open PRs that bump the stable pin. Document the pin and the rustup auto-install behaviour in CONTRIBUTING.md. Closes #487.
There was a problem hiding this comment.
Code Review
This pull request pins the Rust toolchain to version 1.95.0, documents the toolchain and MSRV policies in the contribution guide, and updates the Dependabot configuration. Feedback indicates that the Dependabot ignore configuration for version 1.85.0 is logically flawed and will not effectively freeze the MSRV pin. Additionally, the reviewer pointed out that workflow files mentioned in the PR description are missing from the current diff, which may lead to inconsistencies.
|
|
||
| ## Rust Toolchain | ||
|
|
||
| `rust-toolchain.toml` pins an exact stable release (currently `1.95.0`); CI uses the same pin so pre-commit's `cargo clippy` runs the identical lint set as CI. `rustup` auto-installs and selects the pinned toolchain on first `cargo` invocation in this repo — no manual `rustup update` needed. Dependabot opens PRs to bump the pin as new stable releases land; bumps go through normal review. |
There was a problem hiding this comment.
The workflow files (ci.yml, release.yml) mentioned in the PR description are missing from this diff. To maintain consistency with the defined scope of this PR, please ensure these changes are included, or clarify if they are being handled in a separate, concurrent pull request to avoid overlapping modifications.
References
- Maintain consistency within a pull request's defined scope; avoid removing or modifying fields that are being addressed in separate, concurrent pull requests.
There was a problem hiding this comment.
The ci.yml and release.yml changes are in this PR — git show --stat fdaa8d7 confirms both files were modified in the commit you reviewed (4 ref changes in ci.yml, 2 in release.yml). They show up in git diff main..HEAD --stat on the current tip too. No separate concurrent PR; nothing missing from scope.
| # Stable pin (currently 1.95.0) IS auto-bumped — only freeze the MSRV version | ||
| # so dependabot can still open PRs to advance the stable channel pin. | ||
| - dependency-name: "dtolnay/rust-toolchain" | ||
| versions: ["1.85.0"] |
There was a problem hiding this comment.
The ignore configuration here does not achieve the goal of "freezing" the MSRV pin while allowing the stable pin to update. Specifying versions: ["1.85.0"] tells Dependabot to ignore version 1.85.0 as an update target, which actually encourages an update to the next available version (e.g., 1.86.0). Furthermore, because Dependabot identifies dependencies by name, any range used to freeze the MSRV pin (like > 1.85.0) would also block updates for the stable pin. You may need to manage these updates manually or use a blanket ignore to keep the pins distinct.
There was a problem hiding this comment.
Correct read of the syntax — versions: ["1.85.0"] ignores updates to 1.85.0, not updates from it. The intent of "freeze MSRV but bump stable" can't be expressed cleanly in a single dtolnay/rust-toolchain ignore rule.
Moot at the PR tip: commit 0f023e3 bumps MSRV from 1.85 → 1.95 to match the stable pin and removes the ignore entirely. All five dtolnay/[email protected] refs are now equal and Dependabot will bump them as a group. When MSRV later drops below stable again, this gets revisited — likely with a manual-cadence policy rather than a broken ignore.
There was a problem hiding this comment.
Pull request overview
Pins the repository’s Rust “stable” toolchain to a specific release so local pre-commit (cargo clippy) and CI run the same compiler/Clippy lint set, avoiding drift-related CI surprises.
Changes:
- Pin
rust-toolchain.tomlfromstableto1.95.0. - Pin GitHub Actions workflows that used
dtolnay/rust-toolchain@stableto@1.95.0(while keeping the dedicated MSRV job on@1.85.0). - Adjust Dependabot rules and contributor documentation to reflect the new toolchain pinning approach.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rust-toolchain.toml | Pins local rustup toolchain selection to Rust 1.95.0. |
| CONTRIBUTING.md | Documents the stable pin/MSRV split and expected update cadence. |
| .github/workflows/release.yml | Pins release workflow Rust toolchain setup to 1.95.0. |
| .github/workflows/ci.yml | Pins fmt/clippy/doc/test jobs to 1.95.0 (MSRV job remains 1.85.0). |
| .github/dependabot.yml | Attempts to allow Dependabot to bump the stable toolchain pin while freezing MSRV. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # MSRV pin — dtolnay/[email protected] is intentional; see ci.yml msrv job. | ||
| # Stable pin (currently 1.95.0) IS auto-bumped — only freeze the MSRV version | ||
| # so dependabot can still open PRs to advance the stable channel pin. | ||
| - dependency-name: "dtolnay/rust-toolchain" | ||
| versions: ["1.85.0"] |
There was a problem hiding this comment.
Same point as the other thread, same answer: commit 0f023e3 dropped the ignore when MSRV bumped to 1.95.0 to match the stable pin. Both dtolnay/rust-toolchain refs are now @1.95.0 and Dependabot can bump them in lockstep without any version filter.
|
|
||
| ## Rust Toolchain | ||
|
|
||
| `rust-toolchain.toml` pins an exact stable release (currently `1.95.0`); CI uses the same pin so pre-commit's `cargo clippy` runs the identical lint set as CI. `rustup` auto-installs and selects the pinned toolchain on first `cargo` invocation in this repo — no manual `rustup update` needed. Dependabot opens PRs to bump the pin as new stable releases land; bumps go through normal review. |
There was a problem hiding this comment.
Both points are correct. Fixed in 0b23fe8: the paragraph now (a) qualifies the rustup auto-install behaviour (rustup-managed cargo only) and (b) is explicit that Dependabot bumps the GH Actions refs only — rust-toolchain.toml and Cargo.toml's rust-version need a paired manual update in the same PR when accepting a Dependabot toolchain bump.
Coverage reportTotal: 87.89% (was 87.90%, ● 0.00%) — 11849/13481 lines
History
|
Lift workspace `rust-version` from 1.85 to 1.95 so MSRV no longer trails the stable pin set in the previous commit. The `msrv` CI job stays — its toolchain ref moves from @1.85.0 to @1.95.0, preserving the symbolic separation for when MSRV later drops below stable again. Drop the dependabot `versions: ["1.85.0"]` ignore: with both refs at @1.95.0, all `dtolnay/rust-toolchain` references should bump in lockstep. Bumping MSRV unlocks clippy lints whose suggestions need post-1.85 features: - `clippy::collapsible_if` (let-chains, stable since 1.88) — collapse three nested-`if`/`if-let` blocks in `cache::origin::s3`, `cache::retry`, and `cli::commands::node::is_connection_refused`. - `clippy::duration_suboptimal_units` — replace three `Duration::from_secs(60)` constants/literals with `Duration::from_mins(1)` (gossip reconnect backoff, dispatch GC interval, runtime test). - `clippy::missing_const_for_fn` — mark `SecretString::is_empty` as `const fn`. Update `CLAUDE.md` and `CONTRIBUTING.md` MSRV mentions to 1.95.
…scope The "Rust Toolchain" paragraph asserted rustup auto-installs the pinned toolchain unconditionally and that Dependabot bumps "the pin" — both overstated. Rewrite to: - Qualify the rustup behaviour (rustup-managed cargo only). - Be explicit that Dependabot updates the GH Actions refs in `.github/workflows/`, not `rust-toolchain.toml` or `Cargo.toml`'s `rust-version`. Reviewer of a Dependabot toolchain bump PR has to hand- edit those two files in the same PR to keep dev machines and CI aligned.
Summary
Closes #487.
Toolchain pin (commit fdaa8d7):
rust-toolchain.toml:channel = "stable"→channel = "1.95.0".dtolnay/rust-toolchain@stable→@1.95.0in 4 ci.yml jobs (fmt / clippy / doc / test) + 2 release.yml jobs (release / build-binaries). Themsrvjob initially stayed on@1.85.0.CONTRIBUTING.md: new "Rust Toolchain" subsection.MSRV bump (commit 0f023e3):
Cargo.toml: workspacerust-version1.85 → 1.95 so MSRV matches the stable lint pin.ci.ymlmsrvjob:@1.85.0→@1.95.0. The job stays — when MSRV later drops below stable again, the symbolic separation is already wired.dependabot.yml: drop theversions: ["1.85.0"]ignore — both refs are at@1.95.0and should bump in lockstep.CLAUDE.md/CONTRIBUTING.md: MSRV references updated.clippy::collapsible_if(let-chains, stable since 1.88) — three sites incache::origin::s3,cache::retry,cli::commands::node::is_connection_refused.clippy::duration_suboptimal_units— threeDuration::from_secs(60)→Duration::from_mins(1)(gossip reconnect, dispatch GC, runtime test).clippy::missing_const_for_fn—SecretString::is_empty→const fn.Why
PR #485 had a CI failure pre-commit was supposed to catch: clippy 1.95's
clippy::duration_suboptimal_unitsfired in CI on code that was clean under the developer's local clippy 1.93. Pinning eliminates the local-vs-CI drift. Bumping MSRV in lockstep keeps the workspace's lower bound aligned with the lint set we actually exercise on day-to-day work.Test plan
cargo --versionreports 1.95.0 (rustup auto-selected viarust-toolchain.toml)cargo clippy --workspace --all-targets -- -D warningscleancargo nextest run --workspace— 672/672 passpre-commit run --all-filescleandtolnay/[email protected]ref together when a newer stable lands. With no version-specific ignore active, all five refs should advance in lockstep.🤖 Generated with Claude Code