You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CodeQL Rust extraction fails on 172 of 213 files in cmd/unbounded-storage #616
The CodeQL Rust extractor reports that most of the crate fails to extract:
| Total number of Rust files that were extracted with errors | 172 |
| Total number of Rust files that were extracted without error | 41 |
Observed in the Analyze (rust) job of the CodeQL workflow. The extraction log is full of macro-expansion failures, for example:
WARN cmd/unbounded-storage/src/fabric/error.rs:36:43: macro expansion failed for 'write'
WARN cmd/unbounded-storage/src/fabric/error.rs:38:17: macro expansion failed for 'write'
WARN cmd/unbounded-storage/src/fabric/error.rs:40:44: macro expansion failed for 'write'
These are warnings and do not fail the job, so the check reports green.
Impact
With 80% of files extracted with errors, CodeQL's Rust coverage of cmd/unbounded-storage is largely ineffective. The check passing gives more assurance than it should, which matters as the Rust surface grows (cmd/unbounded-storage, and cmd/racer alongside it).
Notes
codeql.yaml analyzes Rust with build-mode: none, so the extractor works from source without a cargo build. Macro-heavy code is exactly where that struggles. Worth checking whether a build-mode that compiles the crate improves extraction, and whether the extractor needs the workspace's feature flags (the crate has a sim feature used by its deterministic simulation harness).
Found while diagnosing an unrelated merge-queue failure; filing so it is not lost.
Activity