Repository navigation
Conversation
Previously we assumed that the release date of a rust-analyzer crate would match a git tag. However, these dates may not line up exactly which we now handle.
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
One or more issues must be addressed before approval.
Review effort: Balanced
Findings: 2
Open (3)
What changed in this PR
Updates CodeQL’s Rust extractor to rust-analyzer 0.0.357 and exposes its new configuration-predicate AST nodes.
Changes:
- Updates workspace dependencies, Bazel definitions, source archive, and fixed extraction toolchain.
- Adds generated extraction, AST, and CFG interfaces for
CfgPredExprandCfgPredPat. - Adds schema migrations, a change note, test placeholders, and CodeQL setup for automation.
| File | Description |
|---|---|
| unified/extractor/Cargo.toml | Updated as part of this pull request. |
| shared/tree-sitter-extractor/Cargo.toml | Updated as part of this pull request. |
| rust/scripts/update_rust_analyzer.py | Updated as part of this pull request. |
| rust/schema/ast.py | Updated as part of this pull request. |
| rust/ql/test/setup.sh | Updated as part of this pull request. |
| rust/ql/test/extractor-tests/generated/CfgPredPat/MISSING_SOURCE.txt | Updated as part of this pull request. |
| rust/ql/test/extractor-tests/generated/CfgPredExpr/MISSING_SOURCE.txt | Updated as part of this pull request. |
| rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/upgrade.properties | Updated as part of this pull request. |
| rust/ql/lib/rust.dbscheme | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/generated/SynthConstructors.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/CfgPredPat.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/elements.qll | Updated as part of this pull request. |
| rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll | Updated as part of this pull request. |
| rust/ql/lib/change-notes/2026-10-07-rust-analyzer-0.0.357.md | Updated as part of this pull request. |
| rust/ql/integration-tests/conftest.py | Updated as part of this pull request. |
| rust/ql/.gitattributes | Updated as part of this pull request. |
| rust/ql/.generated.list | Updated as part of this pull request. |
| rust/extractor/src/translate/generated.rs | Updated as part of this pull request. |
| rust/extractor/src/toolchain.rs | Updated as part of this pull request. |
| rust/extractor/src/generated/top.rs | Updated as part of this pull request. |
| rust/extractor/src/generated/.generated.list | Updated as part of this pull request. |
| rust/extractor/Cargo.toml | Updated as part of this pull request. |
| rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/upgrade.properties | Updated as part of this pull request. |
| rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/downgrade.ql | Updated as part of this pull request. |
| rust/ast-generator/Cargo.toml | Updated as part of this pull request. |
| ruby/extractor/Cargo.toml | Updated as part of this pull request. |
| MODULE.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with-3.24.0/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with-3.23.0/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.352/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.352/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span-0.0.352/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths-0.0.352/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.352/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.352/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.352/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty-0.0.352/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db-0.0.357/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static-1.5.1/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/either/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/either-1.19.0/BUILD.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tracing-flame-0.2.0.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.sharded-slab-0.1.7.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with-3.24.0.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with_macros-3.24.0.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macros-0.28.5.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macro-rules-0.28.5.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-0.28.5.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.rayon-1.12.0.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-notify-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_tt-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_toolchain-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_utils-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_fixture-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-bridge-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_stdx-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_span-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_project_model-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_profile-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_proc_macro_api-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_paths-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_parser-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_mbe-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_macros-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_load-cargo-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_intern-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_ide_db-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_ty-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_expand-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_def-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_edition-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_cfg-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_base_db-0.0.357.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.lazy_static-1.5.1.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.itertools-0.15.0.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.either-1.19.0.bazel | Updated as part of this pull request. |
| misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel | Updated as part of this pull request. |
| Cargo.lock | Updated as part of this pull request. |
| .github/workflows/update-rust-analyzer.md | Updated as part of this pull request. |
| .github/workflows/update-rust-analyzer.lock.yml | Updated as part of this pull request. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+11
to
+12
| query predicate new_locatable_locations(Element id, Location location) { | ||
| locatable_locations(id, location) and not cfg_pred_exprs(id) and not cfg_pred_pats(id) |
Comment on lines
+4
to
+7
| cfg_pred_exprs.rel: delete | ||
| cfg_pred_expr_cfg_predicates.rel: delete | ||
| cfg_pred_pats.rel: delete | ||
| cfg_pred_pat_cfg_predicates.rel: delete |
Comment on lines
+189
to
+193
| class CfgPredExpr(Expr, ): | ||
| cfg_predicate: optional["CfgPredicate"] | child | ||
|
|
||
| class CfgPredPat(Pat, ): | ||
| cfg_predicate: optional["CfgPredicate"] | child |
paldepind
marked this pull request as draft
October 7, 2026 11:35
Co-authored-by: Copilot <[email protected]> Copilot-Session: 9aa1104f-468b-4aa4-b605-e46c22c1e398
rust-analyzer 0.0.357 fails to resolve many standard-library call targets against the Rust 1.99.0 sysroot, which drops data-flow models and query results. Keep the analysis sysroot at 1.98.1 while retaining the rust-analyzer update. Co-authored-by: Copilot <[email protected]> Copilot-Session: 9aa1104f-468b-4aa4-b605-e46c22c1e398
Restore the Rust 1.99 analysis toolchain and model the canonical alloc/core I/O paths introduced by that release. Add a summary for the new pin macro helper so pin! retains value flow, then regenerate the affected expectations without test failures. Co-authored-by: Copilot <[email protected]> Copilot-Session: 9aa1104f-468b-4aa4-b605-e46c22c1e398
This branch has not been deployed
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.


Automated rust-analyzer update (
rust/scripts/update_rust_analyzer.py, exit status 0).Changes
ra_ap_*crates are at 0.0.357.CfgPredExpr(anExpr) andCfgPredPat(aPat), each with acfg_predicatechild.Validation
bazel run //rust/codegenandbazel run //rust:installsuccessfully.codeql query compileof the downgrade failed becauseold.dbscheme.statsis missing.CfgPredExprandCfgPredPatonly haveMISSING_SOURCE.txtplaceholders. Nothing in this run added test sources for them.Next steps for a maintainer