Commit Graph

40 Commits

Author SHA1 Message Date
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
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
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
6089a75262 Rust/Ruby/Python: format code 2025-02-25 13:19:03 +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
a6f58c9fd2 Rust: add option for proc macro server 2025-02-13 15:37:54 +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
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
Paolo Tranquilli
7988729ee6 Rust: run sysroot discovery once 2025-01-13 16:13:55 +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
Arthur Baars
71959f5faa Rust: address clippy warnings 2024-12-18 13:00:13 +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
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
Paolo Tranquilli
8137419d93 Rust: only accept options.yml in QL tests 2024-11-18 10:40:29 +01:00
Paolo Tranquilli
75375be7ac Rust: add optional dependencies to ql tests
Also accept `options.yml` and `options.yaml` files as well for test options,
to get YAML syntax highlighting. In a follow up PR we might make the extension
mandatory.
2024-11-18 09:42:01 +01:00
Paolo Tranquilli
f77f2b7ff0 Rust: turn off the test cfg by default 2024-11-08 17:07:03 +01:00
Paolo Tranquilli
be45e3deed Rust: allow to specify more cargo configuration options
This allows to tweak via extractor options some aspects of the cargo
configuration:
* the target architecture
* features (including `*` for all, which we must understand whether to
  set by default)
* cfg overrides

Integration tests will be added in a follow-up commit.
2024-11-08 12:23:16 +01:00
Paolo Tranquilli
083394073a Rust: rename target_dir to cargo_target_dir, add to extraction options
Also removed the now unused `extract_dependencies` one.
2024-11-08 09:53:50 +01:00
Paolo Tranquilli
4f6fda0100 Rust: allow to specify the target directory 2024-11-07 12:45:20 +01:00
Paolo Tranquilli
41d0085918 Rust: address review 2024-10-24 17:54:18 +02:00
Paolo Tranquilli
3f8d438851 Rust: move qltest to rust code, add options with cargo check 2024-10-24 12:55:23 +02:00
Paolo Tranquilli
23dd572d5e Rust: add CODEQL_ base env layer 2024-09-13 13:39:39 +02:00
Paolo Tranquilli
403cc3df90 Rust: avoid cli flag defaults overriding env settings 2024-09-13 06:50:12 +02:00
Paolo Tranquilli
5ae8824303 Rust: add context to parameter file expansion errors 2024-09-12 08:56:07 +02:00
Paolo Tranquilli
1b3a5cdab1 Rust: make the cli flags override automatic
This makes the clap flags overlay over `Config` entirely derived via an
attribute macro. Also, the `--intputs-file` option is replaced by a more
standard and versatile `@` parameter file mechanism.
2024-09-11 17:28:59 +02:00
Arthur Baars
f37b4aebc2 Only extract function bodies for local crates,
unless the -Oextract_dependencies=true flag is supplied
2024-09-10 16:49:13 +02:00
Arthur Baars
7c4383975f Filter out trailing empty strings 2024-09-09 13:25:43 +02:00
Paolo Tranquilli
7637393f75 Rust: resolve clippy and rustc warnings 2024-09-09 10:28:50 +02:00
Arthur Baars
d8eb5d463d Rust: run cargo fmt 2024-09-05 14:45:47 +02:00
Paolo Tranquilli
885e89a927 Rust: first running tests 2024-08-30 17:45:51 +02:00
Paolo Tranquilli
7e1290aa74 Rust: reuse shared rust trap library 2024-08-30 16:08:37 +02:00
Paolo Tranquilli
4f0fe1ce3a Rust: bazel packaging 2024-08-30 13:05:46 +02:00