diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-11 12:49:07 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-11 12:49:07 +0100 |
commit | 0ecdba20df41a800222d0fd864843843feb6e875 (patch) | |
tree | f8c96eaece90cd0630075e2693f833e4385404f7 /crates/ra_proc_macro_srv/Cargo.toml | |
parent | 54bdb9c78b012c560efc142971dc3e724989e807 (diff) | |
parent | 31d163aa3be9c938ffe713534e4f648550a35f6c (diff) |
Merge #3920
3920: Implement expand_task and list_macros in proc_macro_srv r=matklad a=edwin0cheng
This PR finish up the remain `proc_macro_srv` implementation :
1. Added dylib loading code for proc-macro crate dylib. Note that we have to add some special flags for unix loading because of a bug in old version of glibc, see https://github.com/fedochet/rust-proc-macro-panic-inside-panic-expample/issues/1 and https://github.com/rust-lang/rust/issues/60593 for details.
2. Added tests for proc-macro expansion: We use a trick here by adding `serde_derive` to dev-dependencies and calling `cargo-metadata` for searching its dylib path, and expand it in our tests.
[EDIT]
Note that this PR **DO NOT** implement the final glue code with rust-analzyer and proc-macro-srv yet.
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_proc_macro_srv/Cargo.toml')
-rw-r--r-- | crates/ra_proc_macro_srv/Cargo.toml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_proc_macro_srv/Cargo.toml b/crates/ra_proc_macro_srv/Cargo.toml index f08de5fc7..1e0f50339 100644 --- a/crates/ra_proc_macro_srv/Cargo.toml +++ b/crates/ra_proc_macro_srv/Cargo.toml | |||
@@ -12,9 +12,12 @@ doctest = false | |||
12 | ra_tt = { path = "../ra_tt" } | 12 | ra_tt = { path = "../ra_tt" } |
13 | ra_mbe = { path = "../ra_mbe" } | 13 | ra_mbe = { path = "../ra_mbe" } |
14 | ra_proc_macro = { path = "../ra_proc_macro" } | 14 | ra_proc_macro = { path = "../ra_proc_macro" } |
15 | goblin = "0.2.1" | ||
16 | libloading = "0.6.0" | ||
17 | test_utils = { path = "../test_utils" } | ||
15 | 18 | ||
16 | [dev-dependencies] | 19 | [dev-dependencies] |
17 | cargo_metadata = "0.9.1" | 20 | cargo_metadata = "0.9.1" |
18 | difference = "2.0.0" | 21 | difference = "2.0.0" |
19 | # used as proc macro test target | 22 | # used as proc macro test target |
20 | serde_derive = "=1.0.104" \ No newline at end of file | 23 | serde_derive = "=1.0.104" |