Lukas Wirth
f2bbb97e1c
proc-macro-srv: Fix <TokenStream as Display>::fmt impl producing trailing whitespace
2025-11-27 13:51:20 +01:00
Lukas Wirth
268df15ee2
Revert to spawning proc-macro-srv without format flag
2025-11-26 11:06:58 +01:00
Lukas Wirth
82bd7ddb5d
minor: Rename proc-macro-srv protocol flags
2025-11-26 09:03:00 +01:00
bit-aloo
cae902c6e7
add codec and framing to abstract encoding and decoding logic from run
2025-11-24 21:44:13 +05:30
bit-aloo
c7435a9bdf
add review suggestions
2025-11-24 15:28:28 +05:30
bit-aloo
e344bfa7ea
add postcard abstraction inside Message trait
2025-11-24 15:28:28 +05:30
bit-aloo
f31214f96a
add postcard related methods to proc-macro-apo
2025-11-24 15:28:27 +05:30
bit-aloo
1dad405ebe
make postcard first class member of proc-macro-srv-cli
2025-11-24 15:28:14 +05:30
Lukas Wirth
b5fc29e252
Fix up feature gates
2025-11-22 18:53:32 +01:00
Lukas Wirth
5409a40efc
Implement rpc protocol changes
2025-11-22 16:58:35 +01:00
Lukas Wirth
87625cc166
Add version command to proc-macro-srv
2025-07-31 10:10:50 +02:00
Lukas Wirth
218e00d0bb
Reorganize proc-macro-srv
2025-07-31 09:55:07 +02:00
Lukas Wirth
a7a365e8f8
Properly clean proc-macro-srv proc-macro temp dir
2025-07-31 09:36:49 +02:00
Lukas Wirth
4d5bb86ad7
Abtract away json protocol for proc-macro-srv
2025-07-30 15:52:10 +02:00
Chayim Refael Friedman
3e834add61
Support spans with proc macro servers from before the ast id changes
...
The only thing changed is the value of the fixup ast id, so we just swap it.
2025-06-12 16:08:48 +03:00
Chayim Refael Friedman
4bcf03e28b
Use stable AST IDs
...
Instead of simple numbering, we hash important bits, like the name of the item.
This will allow for much better incrementality, e.g. when you add an item. Currently, this invalidates the IDs of all following items, which invalidates pretty much everything.
2025-06-12 08:47:22 +03:00
Lukas Wirth
7b9e0911b5
chore: Remove salsa dependency from proc-macro server again
2025-03-27 07:27:57 +01:00
Lukas Wirth
d4122434dd
chore: Remove unused dependencies
2025-03-23 08:08:17 +01:00
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +01:00
Lukas Wirth
5ec0057418
Use interior mutability for loaded ProcMacrorv::expanders
2025-02-05 12:01:57 +01:00
Chayim Refael Friedman
ceba289f80
Store token trees in contiguous Vec instead of as a tree
...
I expected this to be faster (due to less allocations and better cache locality), but benchmarked it is not (neither it is slower). Memory usage, however, drops by ~50mb (of `analysis-stats .`). I guess tt construction is just not hot.
This also simplifies using even less memory for token trees by compressing equal span, which I plan to do right after.
Some workflows are more easily expressed with a flat tt, while some are better expressed with a tree. With the right helpers, though (which was mostly a matter of trial and error), even the worst workflows become very easy indeed.
2025-01-02 19:21:46 +02:00
Lukas Wirth
b2d9486ebd
Move proc-macro protocol into legacy module
2024-12-30 11:47:08 +01:00
Lukas Wirth
714b81bec1
Decouple proc-macro server protocol from the server implementation
2024-12-30 10:33:57 +01:00
Lukas Wirth
a5adfafd93
Do not require a special env var to be set for the proc-macro-srv
2024-12-13 09:29:16 +01:00
Lukas Wirth
8a86fa01ac
Fix clippy lints in proc-macro-srv
2024-12-12 13:30:42 +01:00
Vincent Esche
7dec7e92ea
Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true
2024-08-06 00:26:42 +02:00
Vincent Esche
f8de86b308
Apply Veykril's change suggestions
2024-08-06 00:25:02 +02:00
Vincent Esche
6f329e6d5b
Add repository URL for published crates' missing [package.repository] fields
2024-08-06 00:25:02 +02:00
Vincent Esche
b5b0f4bc5a
Replace "TBD" with more helpful desciptions in published crates' [package.description] fields
2024-08-06 00:25:02 +02:00
Lukas Wirth
c236190b60
Abstract proc-macro-srv protocol format
2024-06-30 16:56:30 +02:00
Lukas Wirth
7c7c0cbffb
Simplify
2024-06-30 16:43:22 +02:00
Lukas Wirth
9d09bc0619
Actual dummy server for the server cli
2024-06-30 16:34:06 +02:00
Lukas Wirth
2fb38ceb66
Faster env snapshotting in proc-macro-srv
2024-06-30 16:10:20 +02:00
bors
af1fd88c4d
Auto merge of #16257 - lnicola:rustc-check-cfg, r=Veykril
...
internal: Teach cargo about `cfg(rust_analyzer)`
r? `@Urgau` is this a good idea?, CC `@Veykril`
2024-04-18 12:13:06 +00:00
Lukas Wirth
9e8a0fae0c
Lint debug prints and disallowed types with clippy
2024-02-01 17:57:27 +01:00
Johann Hemmann
e7e09e7750
large_enum_variant
2024-01-31 19:06:35 +01:00
Lukas Wirth
21a953fe37
Recognize proc macro server unexpectedly exiting and report the exit code
2024-01-09 10:37:26 +01:00
Laurențiu Nicola
3a2ae6410d
Teach cargo about cfg(rust_analyzer)
2024-01-04 18:31:08 +02:00
Lukas Wirth
8390d2aca3
Set sysroot-abi flag for proc-macro-cli when in-rust-tree is set
2024-01-04 11:02:23 +01:00
Lukas Wirth
d480525ce8
Add extern crate rustc_driver to proc-macro-srv-cli
2024-01-04 11:02:23 +01:00
Lukas Wirth
b83f487d10
Set the in-rust-tree` feature for all rust-analyzer{-proc-macro-srv} steps
2024-01-04 11:02:20 +01:00
Laurențiu Nicola
932d85b529
Merge commit ' 426d2842c1' into sync-from-ra2
2024-01-03 11:35:07 +02:00
Tetsuharu Ohzeki
efc87092b3
Use Cargo's [workspace.lints.*] to config clippy
2023-12-29 23:51:32 +09:00
Lukas Wirth
5761b50ed8
More general server config message for proc-macro-api
2023-12-22 10:35:10 +01:00
Lukas Wirth
2e52aa1615
Clean up
2023-12-21 17:24:00 +01:00
Lukas Wirth
a892237ed4
Add rust-analyzer-span server feature equivalent to the ID server
2023-12-21 17:22:59 +01:00
Laurențiu Nicola
f532576ac5
Merge commit ' 457b966b17' into sync-from-ra
2023-12-11 11:16:01 +02:00
Lukas Wirth
b98597f06d
Re-enable proc-macros
2023-11-28 16:28:56 +01:00
Lukas Wirth
6208960c48
Deduplicate dummy test span maps
2023-11-28 10:55:40 +01:00
Laurențiu Nicola
c48062fe2a
Merge commit ' aa9bc86125' into sync-from-ra
2023-06-05 12:04:23 +03:00