Commit Graph

40 Commits

Author SHA1 Message Date
Arthur Baars
8d96c87abe Rust: add UseTree::is_star 2025-01-28 16:12:25 +01:00
Paolo Tranquilli
cae7236f61 Rust: update dependencies 2025-01-13 12:43:43 +01:00
Paolo Tranquilli
6ded99ccb1 Merge branch 'main' into redsun82/cargo-upgrade 2025-01-09 16:05:48 +01:00
Paolo Tranquilli
cd95cc8f94 Rust: update rust-analyzer to 0.0.257 2025-01-09 15:34:07 +01:00
Paolo Tranquilli
53b0a3464d Merge branch 'main' into redsun82/rust-ast-generator-mustache 2025-01-08 17:09:39 +01:00
Paolo Tranquilli
3bf2416e56 Merge pull request #18313 from github/redsun82/rust-mute-warnings-in-uncompiled-blocks
Rust: exclude extraction of code excluded by `cfg`
2025-01-08 17:03:29 +01:00
Paolo Tranquilli
c7a9889606 Rust: update rust-analyzer 2025-01-08 11:14:08 +01:00
Paolo Tranquilli
d2c7decd02 Rust/Ruby: upgrade all cargo dependencies excluding rust-analyzer
The rust-analyzer update will need more work as it seems to break rust
analysis on windows.

This was carried out using `cargo upgrade` from `cargo-edit`:
* getting exclusions options for rust-analyzer with
   ```bash
   cargo upgrade -i --dry-run | grep -o 'ra_ap_\S\+' | sort -u | sed 's/^/--exclude=/' > /tmp/exclude
   ```
* running
   ```bash
   cargo upgrade -i $(cat /tmp/exclude)
   misc/bazel/3rdparty/update_cargo_deps.sh
   ```
2025-01-08 09:57:11 +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
df39610029 Rust: skip injected sources in clippy and fmt checks 2024-12-19 12:29:27 +01:00
Paolo Tranquilli
7f5b8fdcec Rust: remove clippy warnings 2024-12-19 12:22:40 +01:00
Paolo Tranquilli
290a1043b1 Rust: fetch ungram and rust-analyzer code instead of checking it in
* The ungram file is now taken from the rust-analyzer dependencies
  pulled in by bazel
* the grammar parsing code is not published, so it must be taken
  directly from rust-analyzer code. That part should be less prone to be
  updated than the ungram file, so it does not necessarily need to be
  in sync with the rust-analyzer version is used elsewhere.
* both need some patches. The former is patched during build, the latter
  during loading in `MODULE.bazel`.
2024-12-18 16:37:24 +01:00
Paolo Tranquilli
218bc8069b Rust: exclude extraction of code excluded by cfg 2024-12-18 13:34:40 +01:00
Arthur Baars
c13e173681 Rust: fix codegeneration for AsmOptions 2024-12-17 14:05:53 +01:00
Arthur Baars
8e7eedc172 Update codegen/grammar 2024-12-17 14:05:50 +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
53503002a1 Merge branch 'main' into redsun82/rust-tweaks 2024-12-04 09:35:01 +01:00
Paolo Tranquilli
277c9f4087 Rust: add back getAttr to ArrayExpr 2024-12-03 16:12:56 +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
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
e7ffddd52c Rust: rename all *Type to *TypeRef 2024-12-02 10:13:05 +01:00
Simon Friis Vindum
d30f3e2822 Rust: Renamed expr on CallExpr and LetExpr 2024-11-26 15:22:14 +01:00
Paolo Tranquilli
7a86257968 Merge branch 'main' into redsun82/rust-rename 2024-11-26 10:48:19 +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
Simon Friis Vindum
8252e1da02 Rust: Change &String to &str 2024-11-26 09:21:44 +01:00
Paolo Tranquilli
0943389ca1 Rust: add rust-specific deps updater script 2024-11-18 16:16:54 +01:00
Cornelius Riemenschneider
a66f8209f9 Rust: Vendor 3rdparty dependencies.
We've been observing some performance issues using crate_universe on CI.
Therefore, we're moving to vendor the auto-generated BUILD files
in our repository. This should provide a nice speed boost, while
getting rid of the complexity of the "rust cache" job we've been using
when we had a lot of git dependencies.

This PR includes a vendor script, and I'll put up a CI job internally
that runs that vendor script on Cargo.toml and Cargo.lock changes, to check
that the vendored files are in sync.
2024-11-13 13:22:14 +01:00
Paolo Tranquilli
194e0daa8c Rust: add canonical_path and crate_origin to Item 2024-10-25 16:58:04 +02:00
Arthur Baars
b4bb24aa43 Merge remote-tracking branch 'upstream/main' into aibaars/rust-macros 2024-10-11 13:33:50 +02:00
Arthur Baars
db28f1b29e Rust: use macro to inject extraction functions for detached properties 2024-10-10 15:53:13 +02:00
Arthur Baars
8372a2e562 Rust: ensure error and token locations are valid
The locations are "clipped" to the ranges of the parent node of a token,
and the root node of the parse tree for errors.
2024-10-10 15:53:12 +02:00
Arthur Baars
cad2b74137 Rust: integrate Rust Analyzer's Semantic module into extractor 2024-10-10 15:19:46 +02:00
Arthur Baars
69f0e8bcf7 Rust: add MacroStmts and MacroItems 2024-10-10 15:19:43 +02:00
Arthur Baars
b80b6aafdd Rust: extract modifier tokens as predicates 2024-10-10 14:25:05 +02:00
Paolo Tranquilli
61c3aa6288 Rust: integrate rust code generation into //rust/codegen 2024-10-08 10:37:53 +02:00
Paolo Tranquilli
96dda8808c Rust: rename generate-schema -> ast-generator 2024-10-08 10:03:00 +02:00