From e85bb0bb053c93c90d07546c612d16e99322f48c Mon Sep 17 00:00:00 2001 From: sylph-pi Date: Sat, 5 Sep 2026 15:39:44 +0200 Subject: [PATCH] ci: install the clippy component the Clippy step needs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `dtolnay/rust-toolchain@stable` installs a minimal profile. The `native` job named no components, so every run that reached the Clippy step died on error: 'cargo-clippy' is not installed for the toolchain 'stable-aarch64-unknown-linux-gnu' before clippy read a line of source. That is not a lint result; the step had never run. The `fmt` job below always named `components: rustfmt` correctly — this one never did. Two lines of behaviour change. The rest is the comment explaining why the step is left gating on `-D warnings` rather than softened: the workspace is not clippy-clean (run 203's build alone emits ~13 rustc warnings that `-D warnings` promotes to errors), and `continue-on-error` cannot tell "debt not yet paid" from "debt paid". That debt is scoped in #13, the way the rustfmt debt is in #12. Run 203 is what made this visible. With the aarch64 fix in 64bb7da the native job got all the way through: cargo check --workspace ok 10m01s cargo build --workspace ok 19m04s cargo test --workspace ok 16m22s 214 passed, 0 failed cargo clippy --workspace toolchain error Refs #13 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01McNbzUeq1KRBWs4G6X2YVj --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b5fccf8..19dc9943 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,15 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust toolchain + # `stable` installs a MINIMAL profile: rustc, cargo, rust-std and no + # more. Components have to be named. Without this line the Clippy step + # below dies on "'cargo-clippy' is not installed for the toolchain + # 'stable-aarch64-unknown-linux-gnu'" — which is not a lint result, it + # is the step never having run. The `fmt` job below always got this + # right; this one never did. uses: dtolnay/rust-toolchain@stable + with: + components: clippy - name: Cache Cargo registry and build uses: Swatinem/rust-cache@v2 @@ -69,6 +77,20 @@ jobs: - name: Run tests run: cargo test --workspace + # This step has never once executed on this codebase: the toolchain above + # shipped without the component, so every run died on "not installed" + # before clippy saw a line of source. Its result was never pass or fail, + # only unmeasured. With the component installed it becomes a real check, + # and the first honest thing it will report is that the workspace is not + # clean — the build already emits ~13 plain rustc warnings (unused + # imports, unused variables, needless `mut`, dead fields) that + # `-D warnings` promotes to errors, before clippy's own lints are counted. + # + # Left gating on purpose. A red check that measures something is worth + # more than a green one that measures nothing, and the alternative — + # `continue-on-error`, or dropping `-D warnings` — cannot tell "debt not + # yet paid" from "debt paid", which is the shape PROTOCOL.md forbids. + # The debt is scoped in #13, as the rustfmt debt is in #12. - name: Clippy run: cargo clippy --workspace -- -D warnings