summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/proc-macro-srv
AgeCommit message (Collapse)AuthorLines
2025-02-27enable doctestBenjaminBrienen-3/+0
2025-02-05Use interior mutability for loaded `ProcMacrorv::expanders`Lukas Wirth-16/+25
2025-01-26Make proc_macro span's line & column 1-indexed, as documentedChayim Refael Friedman-4/+4
That is, make the fake number that we return 1 and not 0.
2025-01-20proc-macro-srv: make usage of RTLD_DEEPBIND portableFabian Grünbichler-3/+9
the constant is wrong on some platforms (e.g., on mips64el it's 0x10, and 0x8 is RTLD_NOLOAD which makes all this functionality broken), the libc crate takes care of those differences for us. fallback to not setting the flag in non-glibc environments - some of them might have support for it using a different value that we don't know about, and some of them lack it entirely. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-01-10Re-implement rust string highlighting via tool attributeLukas Wirth-2/+7
2025-01-09Make edition per-token, not per-fileChayim Refael Friedman-69/+69
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2025-01-03Merge pull request #18327 from ChayimFriedman2/flat-ttLukas Wirth-262/+208
Store token trees in contiguous `Vec` instead of as a tree
2025-01-02Store token trees in contiguous `Vec` instead of as a treeChayim Refael Friedman-262/+208
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.
2024-12-31Implement `<RaSpanServer as SourceFile>::eq`Lukas Wirth-9/+9
2024-12-30Cleanup proc-macro dylib handlingLukas Wirth-74/+74
2024-12-30Decouple proc-macro server protocol from the server implementationLukas Wirth-130/+69
2024-12-29Enforce a current directory being set for spawned commandsLukas Wirth-0/+3
2024-12-26internal: Workaround salsa cycles leakingLukas Wirth-2/+2
2024-12-18Remove salsa from proc-macro server dep treeLukas Wirth-2/+2
2024-12-15fix: Fix proc-macro dylib names on windowsLukas Wirth-6/+3
2024-12-12Fix clippy lints in proc-macro-srvLukas Wirth-10/+11
2024-12-12Only parse the object file onceLukas Wirth-21/+19
2024-12-11Fix copied proc-macros not being cleaned up on exitLukas Wirth-59/+49
2024-12-11Unload proc-macro dlls on changed timestampLukas Wirth-18/+31
2024-10-31Remove support for compressed dylib metadata from rust-analyzerbjorn3-14/+4
2024-08-29fix: Fix TokenStream::to_string implementation dropping quotation marksLukas Wirth-2/+7
2024-08-29fix: Fix proc-macro server crashing when parsing a non-lexable string into a ↵Lukas Wirth-3/+15
TokenStream
2024-08-06Replace `[package.repository] = "…"` of published crates with ↵Vincent Esche-1/+1
`[package.repository.workspace] = true`
2024-08-06Add repository URL for published crates' missing `[package.repository]` fieldsVincent Esche-0/+1
2024-08-06Replace `"TBD"` with more helpful desciptions in published crates' ↵Vincent Esche-1/+1
`[package.description]` fields
2024-08-05Auto merge of #17799 - Veykril:syntax-bridge, r=Veykrilbors-9/+14
Split out syntax-bridge into a separate crate This functionality is not really tied to mbe macros, so imo it has no place in that crate.
2024-08-05Newtype ErasedFileAstIdLukas Wirth-4/+4
2024-08-05Split out syntax-bridge into a separate crateLukas Wirth-9/+14
2024-07-18Encode edition within FileId in the hir layerLukas Wirth-7/+7
2024-07-17Add always disabled gen parse supportLukas Wirth-3/+4
2024-07-16Switch token trees to use SymbolsLukas Wirth-47/+118
2024-07-15Fix incorrect encoding of literals in the proc-macro-api on version 4Lukas Wirth-1/+1
2024-07-15Encode ident rawness and literal kind separately in tt::LeafLukas Wirth-136/+121
2024-07-01Improve error message when the proc-macro server unexpectedly exitsLukas Wirth-0/+2
2024-06-30Abstract proc-macro-srv protocol formatLukas Wirth-0/+1
2024-06-30Actual dummy server for the server cliLukas Wirth-1/+1
2024-06-30Fix proc-macro-test build scriptLukas Wirth-10/+17
2024-06-30Faster env snapshotting in proc-macro-srvLukas Wirth-84/+101
2024-06-30Move proc-macro-test test path fetching from include to env varLukas Wirth-5/+3
2024-06-30Rename proc-macro-srv::server to server_implLukas Wirth-41/+42
2024-06-30Move proc-macro-srv RUSTC_VERSION fetching from include to env varLukas Wirth-16/+3
2024-06-30Remove inline `rust_2018_idioms, unused_lifetimes` lint warn, Cargo.toml ↵Lukas Wirth-4/+1
already enforces this
2024-06-30Move dylib version stuff to proc-macro-srvLukas Wirth-23/+196
2024-04-21Allow rust files to be used linkedProjectsLukas Wirth-0/+2612