| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Review tier: Balanced
Findings: 1 · 2
| Severity | Finding |
|---|---|
| rust/extractor/src/config.rs — cargo_extra_env is applied afterward and can override or remove RUSTFLAGS, while cargo_check… | |
| rust/extractor/src/config.rs — The documented default for cargo_target_dir is now inaccurate: rust/codeql-extractor.yml:38-39… | |
| rust/extractor/src/config.rs — Correct the spelling of “necessary.” |
Reuses Cargo build artifacts during Rust QL tests to reduce extraction time.
Changes:
| File | Description |
|---|---|
| rust/extractor/src/qltest.rs | Configures preliminary Cargo checks to use the shared target directory. |
| rust/extractor/src/config.rs | Selects target directories and configures rust-analyzer’s environment. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Currently when we run codeql test for Rust, the Rust extractor runs a preliminary cargo check before it begins extraction. This populates a target directory next to the test. The extractor then starts rust-analyzer with a it's target directory being inside the scratch directory. This means that we're create two target directories.
This PR changes this s.t. by default the target directory next to the tests is used by rust-analyzer as well. This speeds up by uncached (without an existing target directory) as well as cached runs.
I had Copilot run the tests in rust/ql/test/library-tests/dataflow/sources/net 2 times on main and 2 times on this branch. The results are below and show a 21%-22% speedup.
This PR should also make CI for Rust faster. The job "Rust Language Tests Linux" took approximately 10 minutes on this PR and 16m and 20m on some other recent Rust PRs. While there's probably a ton of variance in these numbers, it does at least indicate in the direction that CI is faster.