Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Running up to four proc-macro processes per workspace changes expansion concurrency and replicates dylib memory, requiring broader validation of correctness and resource use.
No open issues 🎉
What changed in this PR
Sizes the Rust extractor’s proc-macro server pool to support parallel extraction while limiting memory overhead.
Changes:
- Pass the extraction thread count into configuration creation.
- Clamp the pool size to 1–4 processes.
| File | Description |
|---|---|
rust/extractor/src/main.rs |
Passes extraction threads into configuration creation. |
rust/extractor/src/config.rs |
Sizes and caps the proc-macro server pool. |
Review effort: Max (adaptive)
fa1bd8c to
019580b
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Moving to multiple proc-macro processes changes execution isolation and scheduling while multiplying dylib memory use, exceeding the limited-consequence approval scope.
No open issues 🎉
1 resolved since last review
Review effort: Balanced (adaptive)
f83fcd4 to
3d17a24
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Concurrent proc-macro expansion across up to four server processes changes process-local state sharing and multiplies dylib memory use, requiring runtime validation beyond a limited-scope review.
No open issues 🎉
Review effort: Max (adaptive)
There was a problem hiding this comment.
🔵 Needs a closer look
Assessing sensitivity to server-pool regressions requires deeper analysis of interacting dependency-order priming, concurrent proc-macro requests, and process-global expansion state.
No open issues 🎉
Review effort: Balanced (adaptive)
333002c to
62f9587
Compare
62f9587 to
a703864
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The regression fixture requires integration validation and human review because its reliability depends on timing-sensitive interactions between parallel priming, process-global macro state, and proc-macro server scheduling.
No open issues 🎉
1 resolved since last review
Review effort: Max (adaptive)
a703864 to
8ced51d
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The regression test’s scheduling-sensitive interactions with proc-macro state, server routing, and expansion caching require human review to confirm it reliably detects the original race.
No open issues 🎉
Review effort: Max (adaptive)
Parallel extraction workers otherwise all queue on a single proc-macro server. Use up to four server processes, as each loads every proc-macro dylib. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Stateful proc macros like `enum_dispatch` keep process-global state across expansions, so spreading expansions over a pool of servers can lose generated items. Add an integration test exercising this pattern under parallel extraction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8ced51d to
d484168
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The regression test’s timing-sensitive concurrency and proc-macro scheduling require runtime validation to establish reliable coverage, but the integration test was not run on this head.
No open issues 🎉
Review effort: Max (adaptive)


Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
3d17a2400083818bf742985ff86285b83922222f↑ Unit test pins pool size for 0/1/2/4/32 threads; fails if hardcoded back to 1.
↑
path-resolutionresults identical at 1 and 8 threads (1 vs 4 server processes, none left over).↓ No benchmark of this layer alone; proc-macro QL tests not re-run on this exact head; CI pending.
↑ Restacked unchanged onto L3
4d971dc(L2 CI step plus L3 log wording only); fmt, clippy and 23/23 unit tests pass on this head.↓ CI on this head pending.
Stacked on #23330.
Adds an integration test for stateful proc macros, such as
enum_dispatch, that keep process-global state across expansions, under parallel extraction. This layer originally sized a pool of proc-macro servers from the extraction threads, but rust-analyzer spreads expansions over the pool, so such macros lost generated impls (five on fuel-core). Extraction keeps a single proc-macro server. The test lost impls in every pooled run at 8 threads.Dropping the pool cost little in paired 8-thread runs: no measurable difference on ripgrep, and about 4% extractor wall time on tokio.