ci: pin the toolchain so a rust release cannot redden a green main - #467
Merged
Merged
Conversation
…ted From impl
`redundant_field_names` now fires on the two `#[from]` variants whose field is
named `source`: the derive generates `Self::JsonParse { source: source }`, and
1.99 attributes that to our field span. rustc 1.98.1 did not report it.
The allow sits on the module, not on the variants, because the generated
`impl From` is a sibling item of the enum rather than part of it: an attribute
on the variant leaves the lint exactly where it was, which is what the first
attempt measured. Renaming the field is not an option either way, since
`source` is what thiserror reads to implement `Error::source` and what the
`#[error("...{source}")]` strings interpolate.
CI installed the floating `stable` channel, so the version it tested was whatever had shipped by the time the job ran. On 2026-10-01 that turned main red with no commit in between: rustc moved 1.98.1 -> 1.99.0, clippy gained a lint on code the repository had not touched, and the schema PR that was green on its own branch failed once merged. `rust-toolchain.toml` is now the single place the version is written. `rustup toolchain install` with no argument reads that file, including its `components`, so there is no second copy in the workflow to drift out of step and no way for CI to check a version the working tree does not. It replaces `dtolnay/rust-toolchain` in all four CI jobs and in publish: that action's `toolchain` input is required and defaults to `stable`, and it does not read the manifest, so keeping it would have meant writing the version five more times. Runners ship rustup, and dropping the action removes a third-party dependency from every job. Relying on rustup's implicit auto-install was the alternative and is rejected: it works today, but rustup prints a deprecation for it and says it may stop working, which is the same class of delayed breakage this commit exists to remove. The `audit` job stays as it is. It is designed to fail on a new advisory, and the ten `--ignore` entries are reviewed on a date written next to them. Making that job unconditionally green would mean not auditing.
This was referenced Oct 1, 2026
Merged
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.
mainis red, and no commit broke it. CI installed the floatingstablechannel, so each run tested whatever Rust had shipped by then. rustc moved 1.98.1 → 1.99.0 on 28 September, clippy sharpenedredundant_field_names, and the schema work that had been green on its own branch failed the moment it merged. Two changes here: the lint, and the reason a Rust release could reach a greenmainat all.The lint fires on the two
#[from]variants ofRustmotionErrorwhose field is namedsource. thiserror's derive generatesSelf::JsonParse { source: source }for theFromimpl, and 1.99 attributes that to our field's span. The allow is on the module rather than on the variants: the generatedimpl Fromis a sibling item of the enum, not part of it, so a variant-level attribute leaves the error exactly where it was — measured, not assumed. Renaming the field was the other option and is worse, sincesourceis what thiserror reads to implementError::sourceand what the#[error("…{source}")]strings interpolate. The three tuple variants (Io(#[from] …)) expand to positional construction and never fired;FileReadhas no#[from]and so has no generated impl.rust-toolchain.tomlis now the only place the version is written.rustup toolchain installwith no argument reads it, components included, so no second copy can drift and CI cannot check a version the working tree does not. That replacesdtolnay/rust-toolchainin the four CI jobs and in publish: itstoolchaininput is required, defaults tostable, and does not read the manifest, so keeping it meant writing1.99.0five more times. Runners ship rustup, and the action leaving removes a third-party dependency from every job. Letting rustup auto-install from the manifest implicitly also works today and was rejected: rustup prints a deprecation for it and says it may stop working, which is the same delayed breakage this is meant to remove.The
auditjob is deliberately left alone. It fails on a new advisory by design, and its ten--ignoreentries carry a review date. Making it unconditionally green would mean not auditing.Verification —
cargo fmt --all --check,cargo clippy --workspace --all-targets --features rustmotion/studio -- -D warnings, andcargo test --workspace --features rustmotion/studioon 1.99.0: 2146 passed, 0 failed, 10 ignored across 52 suites. The clippy failure was reproduced locally on 1.99.0 before the fix, at the same two paths CI reported, and the variant-level allow was confirmed insufficient. Not verified: that the runner image's rustup honours the manifest, which only a CI run on this branch can show.No issue exists for this; it came from the red run on
main.