-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implement expand_task and list_macros in proc_macro_srv #3920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7383503
to
197039b
Compare
serde_derive = "=1.0.104" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, why we use an =
dep here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is because we want to lock the version of proc macro to test with. They would change whatSerialize
to expand which may change the test result.
I changed to use std::io::Error for all dylib loading code and fixed other nits too. |
bors r+ |
Build succeeded |
This PR finish up the remain
proc_macro_srv
implementation :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 Some notes about the panic fedochet/rust-proc-macro-panic-inside-panic-expample#1 and Panic inside panic when procedural macro is called with proc_macro::bridge::client rust#60593 for details.
Added tests for proc-macro expansion: We use a trick here by adding
serde_derive
to dev-dependencies and callingcargo-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.