From 6005440fedfb35bcaba9868b0f71d60ffae619b2 Mon Sep 17 00:00:00 2001 From: Baptiste Parmantier Date: Thu, 1 Oct 2026 17:07:31 +0200 Subject: [PATCH 1/2] fix(error): silence the lint clippy 1.99 raises on thiserror's generated 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. --- crates/rustmotion-core/src/error.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/rustmotion-core/src/error.rs b/crates/rustmotion-core/src/error.rs index 49a1e11..a22c705 100644 --- a/crates/rustmotion-core/src/error.rs +++ b/crates/rustmotion-core/src/error.rs @@ -1,3 +1,5 @@ +#![allow(clippy::redundant_field_names)] + use thiserror::Error; pub type Result = std::result::Result; From 60e30c12bd8cdea92f71fc15fc4a4eeaef87db5c Mon Sep 17 00:00:00 2001 From: Baptiste Parmantier Date: Thu, 1 Oct 2026 17:08:09 +0200 Subject: [PATCH 2/2] ci: pin the toolchain so a rust release cannot redden a green main 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. --- .github/workflows/ci.yaml | 21 +++++++++++++-------- .github/workflows/publish.yaml | 3 ++- rust-toolchain.toml | 3 +++ 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7cc4785..782b4fd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,9 +13,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable channel, 2026-09-22 - with: - components: rustfmt + # The version is `rust-toolchain.toml` and nothing else. `rustup toolchain + # install` with no argument reads that file, so there is one place to bump + # and no way for CI to test a version the working tree does not. Installing + # the floating `stable` channel instead is what reddened a green main on + # 2026-10-01: rustc 1.99.0 sharpened a clippy lint and no commit had changed. + - name: Install the pinned toolchain + run: rustup toolchain install - name: Check formatting run: cargo fmt --all --check @@ -30,9 +34,8 @@ jobs: # fonts-dejavu-core: font *files*, not just the libraries. A bare runner has none, # and usvg silently drops an 's when no face resolves. run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev libfreetype6-dev libxkbcommon-x11-dev libwayland-dev libxcb-cursor-dev libasound2-dev fonts-dejavu-core - - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable channel, 2026-09-22 - with: - components: clippy + - name: Install the pinned toolchain + run: rustup toolchain install - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 - name: Clippy # `--features rustmotion/studio` n'est pas décoratif : le studio est @@ -53,7 +56,8 @@ jobs: # fonts-dejavu-core: font *files*, not just the libraries. A bare runner has none, # and usvg silently drops an 's when no face resolves. run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev libfreetype6-dev libxkbcommon-x11-dev libwayland-dev libxcb-cursor-dev libasound2-dev fonts-dejavu-core - - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable channel, 2026-09-22 + - name: Install the pinned toolchain + run: rustup toolchain install - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 - name: Run tests # Même raison qu'au job clippy : sans le feature, les tests du studio @@ -64,7 +68,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 - - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable channel, 2026-09-22 + - name: Install the pinned toolchain + run: rustup toolchain install - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 - name: Install cargo-audit run: cargo install cargo-audit --locked diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 96c7da2..ff82174 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -23,7 +23,8 @@ jobs: # asound: required by cpal, which rodio pulls in for preview audio run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev libfreetype6-dev libxkbcommon-x11-dev libwayland-dev libxcb-cursor-dev libasound2-dev - - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable channel, 2026-09-22 + - name: Install the pinned toolchain + run: rustup toolchain install # La version se lit via `cargo metadata`, pas en grepant un manifeste : elle # est déclarée dans `[workspace.package]` et héritée, donc un `grep diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..0fd1b3a --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.99.0" +components = ["clippy", "rustfmt"]