Paolo Tranquilli
fe7e1c0a6c
Rust: solve all compilation errors but the ones related to the crate graph
2025-03-20 17:49:35 +01:00
Paolo Tranquilli
7cf3cac24a
Rust: reinstate Variant as Addressable
2025-03-20 16:55:37 +01:00
Paolo Tranquilli
ea11b08f28
Rust: rerun code generation
2025-03-20 16:51:35 +01:00
Paolo Tranquilli
13370200cc
Cargo: upgrade dependencies
2025-03-20 16:48:29 +01:00
Paolo Tranquilli
b48d9a255e
Rust: undo rename of Path::segment to Path::part
2025-03-20 16:30:35 +01:00
Paolo Tranquilli
cd15fb3611
Merge pull request #19071 from github/redsun82/codegen-rust-ancestor-order
...
Rust: preserve ordering in rust generated code
2025-03-20 15:50:48 +01:00
Paolo Tranquilli
e2d6643600
Merge pull request #19072 from github/redsun82/rust-fix-canonical-paths-after-rename
...
Rust: fix canonical paths broken on `StructExpr` and `StructPath`
2025-03-20 13:40:24 +01:00
Paolo Tranquilli
e9b931e2aa
Merge branch 'main' into redsun82/codegen-rust-ancestor-order
2025-03-20 13:13:10 +01:00
Paolo Tranquilli
b77c13802b
Rust: fix canonical paths broken on StructExpr and StructPath
...
After the rename done in https://github.com/github/codeql/pull/19059 ,
canonical path extraction was lost on `StructExpr` and `StructPath` as
the identifiers used for the type in the `emit_detached!` macro were not
updated. This fixes that.
2025-03-20 12:16:47 +01:00
Paolo Tranquilli
4110636032
Rust: preserve ordering in rust generated code
...
This is a small devex improvement to the rust code generator.
Usage of `sorted` in `rustgen.py` was causing the generated code to be
completely reshuffled on renames, which made diffs hard to follow. As an
example see [this generated file diff](https://github.com/github/codeql/pull/19059/files#diff-c938ba77a3398dd4c633ada5702a03477705c24740a2f7d1e40d4b270d8c3f86 ).
This will make the order deterministically based on the order of
definitions in the schema file. This means that renames will find the
same place in the generated file, and the place in the generated file
will generally be more predictable with respect to the schema.
However, that does mean this change is heavily reshuffling the generated
code.
2025-03-20 12:12:52 +01:00
Tom Hvitved
cbb9987a20
Merge remote-tracking branch 'upstream/main' into rust/dependency-renaming
2025-03-20 11:45:03 +01:00
Tom Hvitved
d19188db8f
Address review comment
2025-03-20 11:39:52 +01:00
Simon Friis Vindum
b2b650ddd3
Rust: Rename classes with Record to Struct
2025-03-19 12:05:39 +01:00
Tom Hvitved
0bf2bfa2f1
Rust: Take depdency renaming into account when extracting the crate graph
2025-03-19 08:39:22 +01:00
Tom Hvitved
0dd59cbb25
Rust: Make Crate a sub class of Locatable
2025-03-14 13:18:02 +01:00
Arthur Baars
fa79dbc89a
Merge pull request #18228 from github/aibaars/crate-graph
...
Rust: extract crate graph
2025-03-13 10:00:48 +01:00
Paolo Tranquilli
79e06153ed
Merge pull request #18813 from github/redsun82/rust-turn-off-ra-resolution
...
Rust: add flag to turn off extractor path resolution
2025-03-10 14:52:07 +01:00
Arthur Baars
9814aef71f
Address review comment
2025-03-10 10:31:31 +01:00
Arthur Baars
5855a12b03
Rust: fix crate graph after rust-analyzer upgrade
2025-03-10 10:16:28 +01:00
Arthur Baars
845f002124
Rust: add file for root modules of crates
2025-03-10 10:16:26 +01:00
Arthur Baars
8961a22a71
Rust: crate_graph: extract only public items
2025-03-10 10:16:24 +01:00
Arthur Baars
c601adfc65
Rust: add ExtractionStep::CrateGraph
2025-03-10 10:16:18 +01:00
Arthur Baars
e21a7f5336
Rust: extract crate graph
2025-03-10 10:16:13 +01:00
Arthur Baars
75ca04f3dd
Rust: add Crate to dbscheme
2025-03-10 10:16:12 +01:00
Paolo Tranquilli
a444bbc080
Merge branch 'main' into redsun82/rust-turn-off-ra-resolution
2025-02-27 11:11:06 +01:00
Paolo Tranquilli
bfcf9ea606
Rust: fix compilation errors after rust-anlyzer update
2025-02-25 13:37:00 +01:00
Paolo Tranquilli
cbae16b392
Rust: rerun code generation
2025-02-25 13:31:16 +01:00
Paolo Tranquilli
83e442a266
Rust/Ruby: run cargo upgrade --incompatible --pinned
2025-02-25 13:31:16 +01:00
Paolo Tranquilli
6089a75262
Rust/Ruby/Python: format code
2025-02-25 13:19:03 +01:00
Paolo Tranquilli
e8799e346d
Rust/Python: fix edition-related errors
2025-02-25 13:16:58 +01:00
Paolo Tranquilli
eff87d24fa
Rust/Ruby/Python: update rustc and edition
2025-02-25 13:15:19 +01:00
Paolo Tranquilli
d8dad7dff0
Merge branch 'main' into redsun82/rust-trait-path
2025-02-24 14:12:53 +01:00
Paolo Tranquilli
8ef2029f3d
Merge pull request #18756 from github/redsun82/rust-config
...
Rust: expose more rust-analyzer config knobs
2025-02-24 12:51:37 +01:00
Paolo Tranquilli
689e7b8440
Rust: fix <X as Y> path extraction
...
This works around a quirk in rust-analyzer's AST generation machinery,
where for an `<X as Y>` path there might be no way to directly get `Y`
from the path segment.
2025-02-24 10:38:15 +01:00
Paolo Tranquilli
45baceb2f5
Merge pull request #18821 from github/redsun82/rust-license
...
Rust: add licensing information to crates and extractor pack
2025-02-20 22:20:40 +01:00
Paolo Tranquilli
1038f7c035
Rust: add licensing information to crates and extractor pack
2025-02-20 10:22:17 +01:00
Paolo Tranquilli
d0461e2c08
Merge branch 'main' into redsun82/rust-config
2025-02-19 17:09:04 +01:00
Paolo Tranquilli
c1df8d0e13
Rust: add flag to turn off extractor path resolution
2025-02-19 09:44:09 +01:00
Paolo Tranquilli
755140152c
Rust: support glob members in workspaces
2025-02-17 15:09:35 +01:00
Paolo Tranquilli
e1f92b466f
Merge pull request #18608 from github/aibaars/tracing
...
Rust: use tracing/tracing-subscriber for logging
2025-02-14 10:36:54 +01:00
Paolo Tranquilli
a6f58c9fd2
Rust: add option for proc macro server
2025-02-13 15:37:54 +01:00
Paolo Tranquilli
3dd7f23d5a
Merge branch 'redsun82/rust-avoid-linecol-panic' into redsun82/rust-config
2025-02-12 17:02:19 +01:00
Paolo Tranquilli
234d63bb97
Rust: avoid panic from line_index crate
...
We found out we can stumble upon a `line_index.line_col` panic,
specifically when reporting a macro parse error.
This replaces `line_col` with safer `try_line_col`, and deals more
gracefully with the error.
2025-02-12 16:52:36 +01:00
Arthur Baars
18cf39d063
Rust: add verbosity and flamegraph as extractor options
2025-02-12 15:29:27 +01:00
Paolo Tranquilli
1bd384564d
Rust: expose more rust-analyzer config knobs
2025-02-12 14:14:43 +01:00
Arthur Baars
64f0908d0d
Rust: keep FlushGuard in a variable
2025-02-12 10:27:34 +01:00
Arthur Baars
5621eecc86
Rust: config: replace verbose with verbosity
2025-02-12 10:27:33 +01:00
Arthur Baars
3218faee6c
Rust: make flame_log a config option
2025-02-12 10:27:32 +01:00
Arthur Baars
0442d24204
Rust: drop tracing:: qualifiers
2025-02-12 10:27:30 +01:00
Arthur Baars
c602e82ac4
Rust: use tracing-subscriber
2025-02-12 10:27:29 +01:00