(Related to: long-term proc macro support plan)
Before (submodule)
RA is a git submodule in src/tools. When a "sync" happens, rust-lang/rust is updated to point to a different commit (example).
The changes suggested in #12803 (use the sysroot proc_macro crate) make RA/rustc incompatibilities more visible in that the submodule could then stop building.
Fixing that would involve two PRs:
- One to
rust-analyzer, fixing proc-macro-srv to follow proc_macro bridge changes
- One to
rust, bumping rust-analyzer
If the sync cycle isn't changed, this means the rust-analyzer RA component could be missing for up to a week, or even more, if the bridge changes haven't been followed in the rust-analyzer repo.
After (subtree)
Just like clippy, rust-analyzer would be a subtree (also in src/tools).
Feature development / bug fixes to RA happen as usual in the rust-lang/rust-analyzer repository. These can be synced to rust-lang/rust whenever convenient (clippy->rust example PR).
Changes to the proc_macro bridge are followed in the rust-lang/rust repository. These can be synced to rust-lang/rust-analyzer whenever convenient (rust->clippy example commit)
proc-macro-srv never breaks again (in the rustup component version of rust-analyzer), because it's immediately fixed as part of any PRs to rust-lang/rust.
Why does this matter?
A PR was just merged to "add support for the 1.64 ABI", but there's no such thing as "the 1.64 ABI", and it's going to be instabroken, see #12806.
Prior art
Similar discussion for rustfmt: rust-lang/rust#82385 (converted to a subtree in May 2021)
Tagging:
(Related to: long-term proc macro support plan)
Before (submodule)
RA is a git submodule in src/tools. When a "sync" happens,
rust-lang/rustis updated to point to a different commit (example).The changes suggested in #12803 (use the sysroot
proc_macrocrate) make RA/rustc incompatibilities more visible in that the submodule could then stop building.Fixing that would involve two PRs:
rust-analyzer, fixingproc-macro-srvto followproc_macrobridge changesrust, bumpingrust-analyzerIf the sync cycle isn't changed, this means the rust-analyzer RA component could be missing for up to a week, or even more, if the bridge changes haven't been followed in the
rust-analyzerrepo.After (subtree)
Just like
clippy,rust-analyzerwould be a subtree (also insrc/tools).Feature development / bug fixes to RA happen as usual in the
rust-lang/rust-analyzerrepository. These can be synced torust-lang/rustwhenever convenient (clippy->rust example PR).Changes to the
proc_macrobridge are followed in therust-lang/rustrepository. These can be synced torust-lang/rust-analyzerwhenever convenient (rust->clippy example commit)proc-macro-srv never breaks again (in the rustup component version of rust-analyzer), because it's immediately fixed as part of any PRs to
rust-lang/rust.Why does this matter?
A PR was just merged to "add support for the 1.64 ABI", but there's no such thing as "the 1.64 ABI", and it's going to be instabroken, see #12806.
Prior art
Similar discussion for rustfmt: rust-lang/rust#82385 (converted to a subtree in May 2021)
Tagging:
rust-lang/rustfolks are happy to keep theproc-macro-srvcrate up-to-date with bridge changes (pinging other maintainers as needed)proc_macrobridge in the rust-analyzer reporust-lang/rusthistory