82 Commits

Author SHA1 Message Date
bit-aloo
6ae410ccc7
remove crossbeam-channel from proc-macro-srv-cli 2025-12-27 10:40:42 +05:30
bit-aloo
5a91849218
make source_text take non mutable reference of self 2025-12-27 09:43:01 +05:30
bit-aloo
76ea9828a7
rename handler's to be context specific 2025-12-27 09:21:32 +05:30
bit-aloo
91b5c3c664
add bidirectional handle in proc-macro-srv-cli to interact with client and srv 2025-12-27 09:07:08 +05:30
Lukas Wirth
c8d3e3abed
Merge pull request #21249 from Shourya742/2025-11-27-bidirectional-protocol
Add bidirectional messaging proc-macro-srv
2025-12-26 08:08:24 +00:00
Lukas Wirth
af45994feb Introduce cargo-machete ci step 2025-12-25 10:38:05 +01:00
bit-aloo
9b03499a3b
chore: remove unwanted comments, extra lines and putting cli srv on default 2025-12-23 18:30:47 +05:30
bit-aloo
1f64a69249
remove channels with callbacks in proc-macro-srv 2025-12-23 11:59:56 +05:30
bit-aloo
336f025424
remove internal callbacks, and move callback to rust-analyzer level 2025-12-23 07:58:53 +05:30
bit-aloo
2c71fa8cd4
rename PostcardNew to bidirectional-postcard-prototype 2025-12-22 20:56:16 +05:30
bit-aloo
a79fa074fe
remove envelop and keep it simple 2025-12-22 20:04:35 +05:30
bit-aloo
f010e28689
remove request_id, rename postcardNew to BidirectionalPostcardPrototype and remove JsonNew 2025-12-22 19:21:05 +05:30
bit-aloo
19e816d3bf
change request id to u32 to make powerpc happy 2025-12-18 14:47:07 +05:30
bit-aloo
58f2e17866
make imports proper 2025-12-18 14:25:15 +05:30
bit-aloo
57fdf52ecc
refactor the main loop in proc_macro-srv-cli 2025-12-18 14:05:45 +05:30
bit-aloo
178d6ce761
make json-new as default protocol choice for proc-macro-srv-cli 2025-12-15 20:16:51 +05:30
bit-aloo
376bca919e
Add bidirectional messaging proc-macro-srv 2025-12-15 19:28:13 +05:30
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