Paolo Tranquilli
e6cb376ad8
Rust: fix typo
2025-01-17 12:31:48 +01:00
Paolo Tranquilli
bbaff8b199
Rust: cleanup workspace aggregation
2025-01-17 12:19:56 +01:00
Paolo Tranquilli
3c064284b0
Rust: aggregate projects into workspaces
2025-01-15 17:17:19 +01:00
Tom Hvitved
ed07da4327
Rust: Include nested .rs files in codeql test run
2025-01-14 14:35:34 +01:00
Paolo Tranquilli
7988729ee6
Rust: run sysroot discovery once
2025-01-13 16:13:55 +01:00
Paolo Tranquilli
6ded99ccb1
Merge branch 'main' into redsun82/cargo-upgrade
2025-01-09 16:05:48 +01:00
Paolo Tranquilli
4f79199498
Rust: replace std::fs::canonicalize with dunce::canonicalize
...
Rust-analyzer turned out to be quite picky about paths, where
`//?/`-prefixed paths can lead to flaky failures. See
https://github.com/rust-lang/rust-analyzer/issues/18894
for details.
This makes paths always be canonicalized with `dunce`. Previously,
`dunce` was used as a fallback, but that stopped working somewhere
after version 0.0.248 of rust-analyzer.
2025-01-09 15:43:15 +01:00
Paolo Tranquilli
c7a9889606
Rust: update rust-analyzer
2025-01-08 11:14:08 +01:00
Paolo Tranquilli
b390fac105
Rust: make ast-generator use mustache templates
...
This simplifies the code and decouples the code template from the data
that is fed into it.
2025-01-07 18:05:59 +01:00
Paolo Tranquilli
b4811906ea
Rust: address review
2025-01-07 13:05:19 +01:00
Paolo Tranquilli
10d8aa454b
Merge branch 'main' into redsun82/rust-mute-warnings-in-uncompiled-blocks
2025-01-06 10:01:57 +01:00
Paolo Tranquilli
485586f780
Rust: reinstate extraction of test code
...
Users will still be able to opt out:
* for unit tests, by providing the `cargo_cfg_overrides=-test` extractor
option
* for integration tests, by excluding the test files from the analysis
using `paths-ignore` in the codescanning configuration file
We may want to revisit whether we want a single option for both. Also
further work will be needed to restrict our security queries to non-test
code on the QL side.
2024-12-20 14:12:41 +01:00
Paolo Tranquilli
218bc8069b
Rust: exclude extraction of code excluded by cfg
2024-12-18 13:34:40 +01:00
Arthur Baars
71959f5faa
Rust: address clippy warnings
2024-12-18 13:00:13 +01:00
Arthur Baars
029e2604a3
Rust: //rust/codegen
2024-12-17 14:07:44 +01:00
Arthur Baars
3928efe05f
Rust: update rust.ungram
2024-12-17 14:05:12 +01:00
Paolo Tranquilli
4c4a8d7619
Rust: extract isRef for SelfParam
2024-12-16 14:24:56 +01:00
Paolo Tranquilli
08de0b40ed
Merge branch 'main' into redsun82/rust-less-canonical-paths
2024-12-04 14:35:10 +01:00
Paolo Tranquilli
31b9b3adaa
Merge branch 'main' into redsun82/rust-perf-measures
2024-12-04 10:50:37 +01:00
Paolo Tranquilli
59ea563d2a
Merge branch 'main' into redsun82/rust-less-canonical-paths
2024-12-04 10:44:11 +01:00
Paolo Tranquilli
e30a429c3d
Rust: revert TupleStructPat.toString improvements
2024-12-04 10:34:28 +01:00
Paolo Tranquilli
53503002a1
Merge branch 'main' into redsun82/rust-tweaks
2024-12-04 09:35:01 +01:00
Paolo Tranquilli
353f1cafe6
Rust: distinguish [a, b] from [a; b]
...
This splits the `ArrayExpr` class into `ArrayListExpr` and `ArrayRepeatExpr`.
This uses the `synth.from_class` machinery to integrate seamlessly into the
generated code, by hiding the extracted `ArrayExpr` behind an internal class
and replacing it with a hierarchy of those two classes under a new
`ArrayExpr` class.
2024-12-03 15:09:20 +01:00
Paolo Tranquilli
ebe38bca23
Merge branch 'main' into redsun82/rust-less-canonical-paths
2024-12-03 12:19:08 +01:00
Paolo Tranquilli
db18d1046b
Rust: rename getTy -> getTypeRepr
2024-12-03 11:17:08 +01:00
Paolo Tranquilli
e89cf303e7
Rust: rename TypeRef -> TypeRepr
2024-12-02 17:58:40 +01:00
Paolo Tranquilli
c0e55a06e7
Merge branch 'main' into redsun82/rust-perf-measures
2024-12-02 15:20:42 +01:00
Paolo Tranquilli
b57a37479b
Rust: make File usable in codegen
2024-12-02 15:15:46 +01:00
Paolo Tranquilli
e7ffddd52c
Rust: rename all *Type to *TypeRef
2024-12-02 10:13:05 +01:00
Paolo Tranquilli
31775e21b7
Merge branch 'main' into redsun82/rust-less-canonical-paths
2024-12-02 08:27:05 +01:00
Paolo Tranquilli
9486e8b734
Rust: elaborate on path_to_file_id comment
...
This is a follow up to https://github.com/github/codeql/pull/18167 , addressing a
review comment from @paldepind.
2024-12-02 08:16:52 +01:00
Paolo Tranquilli
488903280f
Rust: tentative windows fix
2024-11-29 17:23:30 +01:00
Paolo Tranquilli
c46f44da5f
Rust: fix QL compilation errors
2024-11-29 15:55:51 +01:00
Paolo Tranquilli
9cf2420c3b
Rust: restrict canonical path calculations
2024-11-29 14:43:51 +01:00
Paolo Tranquilli
4bcc4254c6
Merge branch 'main' into redsun82/rust-perf-measures
2024-11-29 11:59:22 +01:00
Paolo Tranquilli
a8188598b0
Merge branch 'main' into redsun82/rust-canonical-enum
2024-11-27 15:01:47 +01:00
Paolo Tranquilli
4e7115538b
Rust: move steps breakdown from JSON diagnostics to the DB
2024-11-27 14:55:46 +01:00
Paolo Tranquilli
27738eaacc
Rust: reorganize perf diagnostics
2024-11-27 12:05:06 +01:00
Paolo Tranquilli
24eb65692f
Rust: add some performance diagnostics
...
This outputs some duration counts for various parts of the extraction
process in the database in the form of telemetry diagnostics.
The diagnostics format was preferred to putting things in the relational
database as that will scale better to code scanning and is more flexible
as for the data we can put into it without passing through the dbscheme.
Also, although it's not the case yet, it will be possible to output
diagnostics even if creation of the database fails.
2024-11-26 16:35:38 +01:00
Simon Friis Vindum
d30f3e2822
Rust: Renamed expr on CallExpr and LetExpr
2024-11-26 15:22:14 +01:00
Paolo Tranquilli
8a01161d4a
Rust: rename MatchExpr.expr to scrutinee in all layers
...
This doesn't require `ql.name` and is simpler while we don't have
to write upgrade scripts. The `ql.name` mechanism might get useful
once we do have to write upgrade scripts, as that doesn't change the
dbscheme.
2024-11-26 10:42:13 +01:00
Paolo Tranquilli
adafe3e5b0
Merge branch 'main' into redsun82/rust-canonical-enum
2024-11-25 15:28:45 +01:00
Simon Friis Vindum
0d02126f12
Generate ParamBase, superclass of Param and SelfParam
2024-11-25 14:07:50 +01:00
Paolo Tranquilli
f3cd61f043
Rust: add extended canonical paths on enum variants
2024-11-22 17:00:57 +01:00
Paolo Tranquilli
b4af5a61d1
Rust: more advanced toString
2024-11-20 16:21:23 +01:00
Paolo Tranquilli
99494dd540
Merge pull request #18012 from github/revert-18011-revert-17937-redsun82/rust-cargo-options
...
Revert "Revert "Rust: allow to specify more cargo configuration options""
2024-11-19 09:03:52 +01:00
Paolo Tranquilli
8377ee545f
Rust: fix reading lists from options.yml
2024-11-18 17:22:23 +01:00
Paolo Tranquilli
abd73e16d4
Revert "Revert "Rust: allow to specify more cargo configuration options""
2024-11-18 15:52:03 +01:00
Paolo Tranquilli
04072591c4
Revert "Rust: allow to specify more cargo configuration options"
2024-11-18 15:36:06 +01:00
Paolo Tranquilli
fa52d03194
Merge pull request #17937 from github/redsun82/rust-cargo-options
...
Rust: allow to specify more cargo configuration options
2024-11-18 13:24:39 +01:00