CodeQL Rust extraction fails on 172 of 213 files in cmd/unbounded-storage · Issue #616 · Azure/unbounded · GitHub
Skip to content

CodeQL Rust extraction fails on 172 of 213 files in cmd/unbounded-storage #616

Open

Description

Problem

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions