Arthur Baars
a253b319d5
Rust: limit number of diagnostics to 100 per trap file
2025-06-18 16:05:11 +02:00
Paolo Tranquilli
75616de613
Rust: make proc_macro test version also 0.0.1
2025-06-18 11:12:13 +02:00
Paolo Tranquilli
27eeaf25fd
Rust: fix lock files
2025-06-18 10:47:44 +02:00
Paolo Tranquilli
8bf171fd85
Rust: add missing use because of semantic conflict
2025-06-18 09:21:40 +02:00
Paolo Tranquilli
03599b43cb
Merge branch 'main' into redsun82/rust-qltest-proc-macro
2025-06-18 09:01:28 +02:00
Paolo Tranquilli
214bbf46e8
Rust: fix test version to 0.0.1 as previously
2025-06-18 09:01:06 +02:00
Paolo Tranquilli
d2a05886c8
Rust: do not do html escaping in cargo template
2025-06-17 17:16:47 +02:00
Paolo Tranquilli
71b9263470
Rust: do not remove Cargo.lock file when running QL tests
2025-06-17 17:11:05 +02:00
Paolo Tranquilli
299fe2eb3f
Rust: add proc-macro capabilities to QL tests
...
This adds the possibility to add a special `proc_macro.rs` source file
to QL tests, which will be generated into a `proc_macro` crate the
usual `lib` crate depends on.
This allow to define procedural macros in QL tests, and is here used to
move the `macro-expansion` integration test to be a language test
instead.
As the generated manifests involved were starting to get a bit complex,
they are now generated from a `mustache` template.
2025-06-17 16:58:33 +02:00
Paolo Tranquilli
667eed9b9b
Rust: store in the DB if a library function or const had a body
...
When skipping bodies in library code, we lose the information whether a
body was originally present. This can be important, for example when
determining whether a trait method has a default implementation.
With this change that information can be recovered via the
`hasImplementation` predicate.
2025-06-03 10:41:31 +02:00
Paolo Tranquilli
dfc03cbad1
Merge branch 'main' into redsun82/rust-extract-libs
2025-06-02 15:33:53 +02:00
Paolo Tranquilli
fa3fcf0f95
Rust: skip all token trees in library mode
2025-06-02 09:32:39 +02:00
Paolo Tranquilli
7be44d2fe8
Merge branch 'main' into redsun82/rust-skip-unexpanded-in-libraries
2025-06-02 09:27:56 +02:00
Paolo Tranquilli
ca661c7877
Rust: use all features by default
2025-05-29 11:19:08 +02:00
Arthur Baars
55be5fbf9e
Merge pull request #19588 from github/aibaars/rust-enable-attribute-macros
...
Rust: re-enable attribute macro expansion in library mode
2025-05-29 10:59:07 +02:00
Arthur Baars
bfe3413445
Merge pull request #19612 from github/aibaars-patch-2
...
Rust: delete leftover log statement
2025-05-28 18:11:27 +02:00
Paolo Tranquilli
06eeb10db8
Merge branch 'main' into redsun82/rust-extract-libs
2025-05-28 17:23:28 +02:00
Paolo Tranquilli
923a2854cb
Ruby, Rust: add zstd compression option
2025-05-28 16:41:55 +02:00
Paolo Tranquilli
a86dfe173e
Rust: fix gzip compression
2025-05-28 16:41:54 +02:00
Arthur Baars
19283102da
Rust: delete leftover log statement
2025-05-28 15:51:42 +02:00
Arthur Baars
d018c02a78
Merge pull request #19583 from github/aibaars/lib-as-source
...
Rust: add option to extract dependencies as source files
2025-05-27 14:10:58 +02:00
Arthur Baars
ac724d2671
Update rust/extractor/src/main.rs
...
Co-authored-by: Simon Friis Vindum <simonfv@gmail.com >
2025-05-27 13:08:20 +02:00
Arthur Baars
dc7958071a
Rust: re-enable attribute macro expansion in library mode
2025-05-27 10:54:48 +02:00
Paolo Tranquilli
c3af98b5cd
Rust: skip unexpanded stuff in library emission
...
This will skip all unexpanded entities in library extraction, where we
only really care about expanded things. This means skipping:
* the token tree of macro calls
* the unexpanded AST of attribute macros
In the latter case, in order to replace the single `Item` with its
expansion (which is a `MacroItems` entity), we wrap the `MacroItems` in
a dummy `MacroCall` with null path.
2025-05-27 09:09:07 +02:00
Arthur Baars
765afdbae0
Rust: add option to extract dependencies as source files
2025-05-26 18:21:35 +02:00
Paolo Tranquilli
add3c941a2
Merge branch 'main' into redsun82/rust-macro
2025-05-26 11:47:58 +02:00
Paolo Tranquilli
a946de48fd
Merge branch 'main' into redsun82/rust-extract-libs
2025-05-26 09:00:31 +02:00
Paolo Tranquilli
5c294617c5
Rust: update a comment
2025-05-23 14:43:18 +02:00
Paolo Tranquilli
abf21ba767
Rust: skip macro expansion in unexpanded attribute macro AST
2025-05-23 12:01:00 +02:00
Arthur Baars
b62d52ede0
Rust: prevent source files from being extracted in both source and library mode
...
When analysing a repository with multiple separate but related sub-projects there is a
risk that some source file are extracted in library mode as well as source mode.
To prevent this we pre-fill 'processed_files' set with all source files, even though they have
not be processed yet, but are known to be processed later..
This prevents source file to be
2025-05-23 10:35:16 +02:00
Arthur Baars
df99e06c81
Rust: temporarily disable attribute macro expansion in library mode
2025-05-23 07:47:31 +02:00
Paolo Tranquilli
7e917c9c35
Rust: move body skipping logic to code generation
2025-05-22 14:44:42 +02:00
Arthur Baars
7e5f6523c5
Rust: disable ResolvePaths when extracting library source files
2025-05-22 11:35:54 +02:00
Arthur Baars
28be2086ad
Rust: drop too noisy log statements
2025-05-22 09:53:43 +02:00
Arthur Baars
a6cd60f20e
Rust: address comments
2025-05-22 09:53:41 +02:00
Arthur Baars
fa1a21b20d
Rust: reduce log-level of diagnostics when extracting library files
2025-05-22 09:53:39 +02:00
Arthur Baars
c69aa224c7
Rust: restrict to library files
2025-05-22 09:53:34 +02:00
Arthur Baars
3761099de9
Rust: drop Param::pat when extracting libraries
2025-05-22 09:53:21 +02:00
Arthur Baars
44a404571f
Rust: fixes
2025-05-22 09:53:12 +02:00
Arthur Baars
f05bed685d
Rust: remove module data from Crate elements
2025-05-22 09:51:34 +02:00
Arthur Baars
dd5c487628
Rust: extract source files of depdendencies
2025-05-22 09:51:33 +02:00
Paolo Tranquilli
799c39bc9b
Rust: ignore target in qltest
...
The target file created by `cargo check` was causing problems in
language tests.
We might want to also ignore `target` by default in the production
indexing, but I'll leave that for further discussion.
2025-05-20 16:30:05 +02:00
Paolo Tranquilli
a99556e021
Merge branch 'main' into redsun82/rust-expand-attr-macros
2025-05-13 16:21:29 +02:00
Arthur Baars
9b0854edb1
Merge pull request #19335 from github/aibaars/macro-stmts
...
Rust: make MacroStmts expressions
2025-05-03 11:22:15 +02:00
Arthur Baars
bc35599f1a
Rust: rename MacroStmts to MacroBlockExpr
2025-05-02 16:23:02 +02:00
Arthur Baars
9ca6706550
Rust: make MacroStmts a CFG Expr
2025-05-02 16:22:59 +02:00
Paolo Tranquilli
674800748b
Rust: fix location emission
2025-05-02 15:24:31 +02:00
Tom Hvitved
07829e5231
Merge pull request #19421 from github/aibaars/rust-builtin-types
...
Rust: extract declarations of builtin types
2025-05-02 14:43:47 +02:00
Paolo Tranquilli
82736ea621
Rust: add diagnostics about item expansion not working properly
2025-05-02 13:43:00 +02:00
Arthur Baars
53b2e9708c
Rust: extract declarations of builtin types
2025-05-01 14:27:21 +02:00