Commit graph

48 commits

Author SHA1 Message Date
bjorn3
17a6bb557e Support reading uncompressed proc macro metadata
rust-lang/rust#113695 makes the dylib metadata uncompressed for perf
reasons. This commit allows reading both the current compressed and
future uncompressed dylib metadata.
2023-07-17 13:30:19 +00:00
Lukas Wirth
8823db6c78 Bump more deps 2023-06-22 11:44:10 +02:00
Laurențiu Nicola
c3dbe7c717 Merge remote-tracking branch 'upstream/master' into sync-from-rust 2023-06-05 11:07:47 +03:00
jyn
aa65395c49 Update proc-macro-api for the new rustc metadata format 2023-05-26 11:59:25 -05:00
Laurențiu Nicola
7197a27028 Use triomphe Arc 2023-05-02 20:02:43 +03:00
Lukas Wirth
c21860bd6a Remove proc-macro server command from the rust-analyzer binary 2023-04-26 08:19:28 +02:00
Lukas Wirth
9fb1b04826 Encode closing delimiter span in FlatTrees 2023-04-14 10:34:41 +02:00
Lukas Wirth
3ae9bfe266 Remove client side proc-macro version check 2023-03-25 15:43:58 +01:00
Lukas Wirth
39e86e78c3 Bump Cargo.lock 2023-03-25 15:12:39 +01:00
Laurențiu Nicola
7e711da2f0 ⬆️ rust-analyzer 2023-02-20 10:14:12 +02:00
Rune Tynan
853f047245
Cargo fmt 2023-02-14 14:45:05 -05:00
Rune Tynan
bc81d582c9
Add v7 support to rust-analyzer 2023-02-14 12:29:33 -05:00
Laurențiu Nicola
bc45c7659a ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
Laurențiu Nicola
8828f3494e Hide proc macro server version detection errors 2023-02-09 10:46:36 +02:00
bors
6133e27b83 Auto merge of #14070 - Veykril:proc-macro-api, r=Veykril
Implement proc-macro-api versioning

So as it stands, we can't really change the proc-macro-api protocol at all without breaking all proc-macro servers again. To somewhat alleviate this we can move the supported ABI mess over to the proc-macro-api now by supporting multiple versions there (versions defined by us at least, not by rustc). Since the proc-macro-api protocol has no versioning scheme at the moment though, the best we can do here is add a new request to query the version from a server. Due to how the server currently works though, if it encounters an unknown request it will exit, meaning we can check if it is a server without support by checking if it exited after our version check request, that way we can support the current circulating server as well.

We need this since our span type will change from `TokenId` to something else at some point, but for that to work we need to comply with that the server expects. So knowing the version the server is using we can decide whether to send our new span data, or the tokenid (assuming we keep that information with our span data as well, alternatively we send irrelevant tokenids). That way we can keep old servers working while the user installations slowly migrate to newer servers that support the new spandata.
2023-02-03 09:41:24 +00:00
Lukas Wirth
8e998c4aa7 Fail spawning proc-macro servers when their api version is newer than r-a's 2023-02-03 10:38:38 +01:00
Laurențiu Nicola
ff340f9c21 Bump zip 2023-02-01 19:24:32 +02:00
Lukas Wirth
c40b0895f0 Implement proc-macro-api versioning 2023-02-01 11:04:20 +01:00
Lukas Wirth
41a46a78f2 Make tt generic over the span data 2023-01-31 14:58:16 +01:00
Lukas Wirth
d712e52940 fix: Fix process-changes not deduplicating changes correctly 2023-01-25 15:01:15 +01:00
Laurențiu Nicola
8f678a0169 Bump snap 2023-01-21 14:05:22 +02:00
Laurențiu Nicola
25a5bd9b13 Bump object 2023-01-21 14:05:22 +02:00
bors
fa874627f0 Auto merge of #13969 - Veykril:workspace.dependencies, r=Veykril
Use workspace.dependencies to declare local dependencies
2023-01-17 10:29:27 +00:00
Lukas Wirth
bed4db3c62 Use workspace.dependencies to declare local dependencies 2023-01-17 10:52:26 +01:00
Lukas Wirth
e4858fe480 Specify authors, edition and license via workspace.package 2023-01-16 16:44:00 +01:00
Lukas Wirth
679df2adf1 Specify rust-version via workspace.package 2023-01-16 16:33:01 +01:00
arcnmx
25242fe93f ⬆️ rust-analyzer
Merge commit '368e0bb32f1178cf162c2ce5f7e10b7ae211eb26'
2023-01-09 10:36:22 -08:00
Daniel Eades
aa90d02079 remove useless operations 2023-01-02 15:02:54 +00:00
Yuri Astrakhan
d3dbf9c194 Moar linting: needless_borrow, let_unit_value, ...
* There are a few needless borrows that don't seem to be needed. I even did a quick assembly comparison and posted a q to stackoveflow on it. See [here](https://stackoverflow.com/questions/74910196/advantages-of-pass-by-ref-val-with-impl-intoiteratoritem-impl-asrefstr)
* removed several `let _ = ...` when they don't look necessary (even a few ones that were not suggested by clippy (?))
* there were a few `then(|| ctor{})` that clippy suggested to replace with `then_some(ctor{})` -- seems reasonable?
* some unneeded assignment+return - keep the code a bit leaner
* a few `writeln!` instead of `write!`, or even consolidate write!
* a nice optimization to use `ch.is_ascii_digit` instead of `ch.is_digit(10)`
2022-12-25 05:07:47 -05:00
Yuri Astrakhan
e16c76e3c3 Inline all format arguments where possible
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.

The change was automatically created with, so there are far less change
of an accidental typo.

```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Laurențiu Nicola
a2a1d99545 ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
Lukas Wirth
ffd7bf8bf9 Bump Cargo rust-version fields to latest stable 2022-11-07 12:59:51 +01:00
Laurențiu Nicola
a99a48e786 ⬆️ rust-analyzer 2022-10-18 09:12:49 +03:00
Laurențiu Nicola
bb6990c4c9 Bump tracing 2022-10-15 12:52:34 +03:00
Laurențiu Nicola
8231fee466 ⬆️ rust-analyzer 2022-08-16 11:24:50 +03:00
Laurențiu Nicola
22c8c9c401 ⬆️ rust-analyzer 2022-08-09 07:23:57 +03:00
KaDiWa
232176b46a
remove imports that are also in edition 2021's prelude 2022-08-09 01:16:32 +02:00
Jonas Schievink
bd7dfac5eb Fix r-a spelling in some places 2022-08-01 13:47:09 +02:00
Amos Wenger
a1f1b95d00 Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component 2022-07-26 11:53:50 +02:00
Amos Wenger
74a2fad5e6 Gate and rename binary, use it if it's in the sysroot 2022-07-25 16:22:39 +02:00
Amos Wenger
30769598a4 Move version string to RustcInfo, read '.rustc' section only once 2022-07-21 13:57:36 +02:00
Amos Wenger
fdddd83224 Assert that sysroot ABI version matches exactly
Otherwise, fall back to the multi ABI scheme, except in testing, where
it becomes a hard error.

This should make it possible to use a rustup-provided rust-analyzer with
proc macro dylibs compiled by older rustcs, and it'll also catch changes
to the format of `rustc --version` or the `.rustc` section that would
make them impossible to compare for equality.
2022-07-21 13:13:25 +02:00
Amos Wenger
23d25a3094 Enable extra warnings required by rust-lang/rust 2022-07-20 15:00:17 +02:00
Jonas Schievink
6c6ae965ba Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
Laurențiu Nicola
e05e6c60a7 Bump object 2022-07-03 10:14:48 +03:00
Lukas Wirth
7d51fc4640 Show proc-macro loading errors in unresolved-proc-macro diagnostics 2022-06-15 17:34:01 +02:00
Lukas Wirth
76ae5434fa internal: Bump Dependencies 2022-06-10 17:30:02 +02:00
Peh
1f011fa4a3 style: rename crates to kebab case 2022-05-01 10:48:58 +00:00