Pin the CodeQL Rust toolchain to 1.94 - #297
Merged
Merged
Conversation
The Rust job scans successfully but reports "Low Rust analysis quality": 49% of calls have a call target (threshold 50%), and 110 of 122 files are "extracted with errors". The extraction log shows why -- `vec!`, `format!`, `assert_eq!` and `$crate::format_args_nl` all fail to expand, so everything inside the workspace's most common macros loses its call targets and types. The cause is the std version on the runner, not this repository's code: bundle 2.26.3 vendors ra_ap_* 0.0.301, which handles std up to 1.94 and fails on these macros from 1.96 on. dtolnay/rust-toolchain@stable installed 1.97.1. See github/codeql#19982 -- the same thread rules out a missing `rust-src`. Nothing is compiled under `build-mode: none`, so the toolchain version only decides which std rust-analyzer reads; it does not have to match the release build, and no other workflow is touched. Temporary: rust-analyzer 0.0.328 landed upstream two days after 2.26.3 shipped, so bundle 2.26.4 should let the pin go back to `stable`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DNWGWJivRhKnTmXjsWSRj3
Contributor
repowisediff shape at the 39th percentile of recent commits. Advisory only — this check never fails a build. Health is 1–10, higher is better. |
Member
Author
|
Verified on the run for this PR (32363716525), against the last
cargo 1.94 resolves the workspace without complaint, so the |
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.
Why
The CodeQL Rust job passes, but every run reports Low Rust analysis quality:
The extraction log for the last run on
mainshows what is behind those numbers:vec!,format!,assert!andpanic_2021are everywhere in this workspace, and everything inside an unexpanded macro loses its call targets and types. So this is real lost coverage for the security queries, not only noisy logs.Cause
Not this repository's code, and not the recent dependency changes: the failures track the std version on the runner. Bundle 2.26.3 vendors
ra_ap_* 0.0.301, which copes with std up to 1.94 and fails on exactly these macros from 1.96 onwards.dtolnay/rust-toolchain@stableinstalled 1.97.1. See github/codeql#19982 — the same thread rules out the obvious other suspect, a missingrust-srccomponent ("installing it changed the count by exactly zero").Change
Pin that one job's toolchain to
1.94. Nothing is compiled underbuild-mode: none, so the version only decides which std rust-analyzer parses — it does not need to match the release build, and no other workflow is affected.Removing the pin
rust-analyzer 0.0.328 merged upstream (github/codeql#21714) on 2026-08-14, two days after 2.26.3 shipped. Once the runner picks up 2.26.4 or later, this goes back to
stable. The comment in the workflow says so.Verification
The CodeQL run on this PR is the test — it should show the macro-expansion warnings gone and the two percentages back above their thresholds. If cargo 1.94 turns out not to resolve the workspace, the job fails loudly rather than silently degrading.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DNWGWJivRhKnTmXjsWSRj3