From 25ac5cbb1077d275d14d04b05c7d057e0c5b5643 Mon Sep 17 00:00:00 2001 From: Zhang Yanpo Date: Wed, 18 Nov 2026 17:44:33 +0800 Subject: [PATCH] fix: ci: install cargo-audit with --locked # Summary The lint job installs cargo-audit with `--locked`, so it builds with the dependency versions cargo-audit was released with. Every `ci` run failed at that step, on push, pull request and the weekly schedule. # Details Without `--locked`, `cargo install cargo-audit` resolves the latest dependencies: cargo-audit 0.23.0 then pulls `smol_str` 0.3.7, which needs rustc 1.89, while `rust-toolchain.toml` pins nightly-2025-05-01, rustc 1.88. With its lock file, cargo-audit 0.23.0 builds on that toolchain. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2aca3e7..23ef31f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,9 @@ jobs: - shell: bash - run: cargo install cargo-audit + # `--locked`: the latest dependencies of cargo-audit can need a newer rustc than the one + # pinned by `rust-toolchain.toml`. + run: cargo install cargo-audit --locked - name: Audit dependencies