Paolo Tranquilli
c70198e4e4
Rust: change dummy macro call expansion
2025-07-02 12:25:10 +02:00
Paolo Tranquilli
bf09c92528
Rust: add location to dummy MacroCalls in library mode
2025-07-02 10:33:53 +02:00
Paolo Tranquilli
223f0c8684
Rust: fix macro expansion in library code
...
There was a mismatch between a `self.macro_context_level += 1` and the
corresponding `self.macro_context_level -= 1`, which resulted in an
`usize` underflow (panic in debug mode, wrong behaviour in release
mode).
This fixes it and adds a relevant assertion and test. In order to
properly test library mode extraction, a special option enforcing that
on source code as well is added.
2025-07-01 17:31:26 +02:00
Paolo Tranquilli
5d3bdb955c
Merge branch 'main' into redsun82/rust-item-reorg
2025-06-25 14:34:48 +02:00
Paolo Tranquilli
1f66f902e5
Rust: fix parallel execution of tests using the nightly toolchain
...
Since we dropped checked in toolchain files for tests requiring nightly,
the `setup.sh` script was not doing its job of setting up the toolchains
and the `rust-src` component, occasionally leading to test failures.
2025-06-25 14:13:43 +02:00
Nick Rolfe
c6ff07ad5a
Merge branch 'main' into nickrolfe/ruby-overlay-extraction
2025-06-25 05:46:26 -04:00
Paolo Tranquilli
bcca47c873
Rust: make AssocItem and ExternItem subclasses of Item
2025-06-25 10:25:24 +02:00
Paolo Tranquilli
d0c7550119
Rust: refactor pre_emit! and post_emit! to a trait
2025-06-24 10:40:33 +02:00
Paolo Tranquilli
cbd62a8b75
Rust: address review and test failure
2025-06-23 13:15:09 +02:00
Paolo Tranquilli
377fb00dea
Merge branch 'main' into redsun82/cargo-upgrade-3
2025-06-23 12:26:15 +02:00
Paolo Tranquilli
3ffaf5722a
Rust: fix Meta missing post_emit! implementation
2025-06-23 10:43:39 +02:00
Arthur Baars
f4bdd4d35a
Merge branch 'main' into redsun82/rust-derive-macro-expansion
2025-06-20 19:32:08 +02:00
Arthur Baars
d303a2cf85
Merge branch 'main' into redsun82/cargo-upgrade-3
2025-06-20 19:16:59 +02:00
Arthur Baars
666144ef11
Merge pull request #19823 from github/aibaars/rust-expand-assoc-items
...
Rust: expand attribute macros on `AssocItem` and `ExternItem`
2025-06-20 19:13:44 +02:00
Arthur Baars
089f35330f
Merge branch 'main' into redsun82/cargo-upgrade-3
2025-06-20 19:07:39 +02:00
Arthur Baars
9605eb09b4
Merge pull request #19774 from github/aibaars/limit-diagnostics
...
Rust: limit number of diagnostics to 100 per trap file
2025-06-20 18:29:57 +02:00
Paolo Tranquilli
7edae1eb17
Rust: suppress some expected macro expansion warnings
2025-06-20 17:56:09 +02:00
Paolo Tranquilli
02a9d4c86d
Rust: fix compilation errors
2025-06-20 17:52:36 +02:00
Paolo Tranquilli
efd318dc01
Rust: rerun codegen
2025-06-20 17:45:08 +02:00
Paolo Tranquilli
ce29d8a59a
Cargo: run upgrade
2025-06-20 17:34:23 +02:00
Paolo Tranquilli
02b6e856a3
Rust: remove VariantDef
2025-06-20 15:59:18 +02:00
Paolo Tranquilli
7a3f4a622e
Merge branch 'main' into aibaars/rust-expand-assoc-items
2025-06-20 15:22:20 +02:00
Paolo Tranquilli
7f1769e8d1
Rust: fix nightly toolchain version for tests using it
...
Rather than fixing the version separately for each test, we can just
request to use a nightly in the `options.yml` file, with the specific
version hard-coded in `qltest.rs`. We can update it if we need to.
It's better to have a single nightly version for all tests that require
it, in order to avoid downloading more versions than necessary.
2025-06-20 14:03:42 +02:00
Arthur Baars
2acce96bb5
Apply suggestions from code review
...
Co-authored-by: Paolo Tranquilli <redsun82@github.com >
2025-06-20 13:25:54 +02:00
Arthur Baars
b7f66f8653
Rust: Rust: expand attribute macros on AssocItem and ExternItem
2025-06-20 13:21:26 +02:00
Paolo Tranquilli
e935bd6faf
Rust: expand derive macros
2025-06-20 11:19:06 +02:00
Nick Rolfe
665df4baef
Ruby: add minimal path transformer support
...
Supports only a minimal subset of the project layout specification;
enough to work with the transformers produced by the CLI when building
an overlay database.
2025-06-19 16:34:16 +01:00
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