rust/crates
bors[bot] 62622c6940
Merge #9550
9550: Proc macro multi abi proof of concept r=matklad a=alexjg

#8925 was irritating me so I thought I would have a bash at fixing it. What I've done here is copy the `crates/proc_macro_srv/src/proc_macro` code (which is copied from `<RUST>/library/proc_macro`) to `crates/proc_macro_srv/src/proc_macro_nightly` and the modified the nightly version to include the changes from https://github.com/rust-analyzer/rust-analyzer/pull/9047 and aeb7b183a2

This gives us the code to support both stable and nightly ABIs. Then we use the `proc_macro_api::version::read_dylib_info` to determine which version of the ABI to load when creating a `ProcMacroLibraryLibLoading` (which is now an enum). 

This seems to work for me.  The code could be cleaned up but I wanted to see if the approach makes sense before I spend more time on it.

I've split the change into two commits, the first is just copying and modifying the `proc_macro` crate, the second contains most of the interesting work around figuring out which ABI to use.

Co-authored-by: Alex Good <alex@memoryandthought.me>
Co-authored-by: alexjg <alex@memoryandthought.me>
2021-07-13 10:35:20 +00:00
..
base_db minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
cfg minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
flycheck cargo_metadata 0.14 2021-07-09 11:01:55 -04:00
hir internal: get rid of a call to slow O(N) visibility_of function 2021-07-12 21:13:43 +03:00
hir_def internal: get rid of a call to slow O(N) visibility_of function 2021-07-12 21:13:43 +03:00
hir_expand Update list of safe intrinsics 2021-07-08 15:49:39 +02:00
hir_ty Add test for #9560 2021-07-11 16:14:39 +02:00
ide Return both field and local references for shorthands in goto_def 2021-07-11 16:16:16 +02:00
ide_assists Inline name classification reference calls 2021-07-11 15:39:09 +02:00
ide_completion Merge #9567 #9568 2021-07-11 12:51:33 +00:00
ide_db internal: get rid of a call to slow O(N) visibility_of function 2021-07-12 21:13:43 +03:00
ide_diagnostics internal: remove one more needless extern crate 2021-07-11 15:48:49 +03:00
ide_ssr minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
mbe minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
parser minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
paths minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
proc_macro_api Address review comments 2021-07-12 15:19:53 +02:00
proc_macro_srv Introduce proc_macro_srv::abis, impl 1.47 and 1.55 2021-07-12 16:05:45 +01:00
proc_macro_test cargo_metadata 0.14 2021-07-09 11:01:55 -04:00
profile minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
project_model Set more CARGO_ env vars 2021-07-12 15:34:49 +02:00
rust-analyzer drop unused fields 2021-07-11 13:51:52 +03:00
sourcegen minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
stdx Remove proc macro management thread 2021-07-08 16:43:39 +02:00
syntax Merge #9557 2021-07-10 17:25:16 +00:00
test_utils Update inline_call assist doc example 2021-07-05 14:24:25 +02:00
text_edit minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
toolchain minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
tt minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
vfs minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
vfs-notify This patch shortens the spawned threads' names, as threads on Linux 2021-07-08 18:27:54 +05:30