api-macros: Move request / response trait impl generation into a custom derive#664
api-macros: Move request / response trait impl generation into a custom derive#664
Conversation
| } | ||
|
|
||
| impl<'ast> Visit<'ast> for Visitor { | ||
| fn visit_lifetime(&mut self, _lt: &'ast Lifetime) { |
There was a problem hiding this comment.
Sweet I had changed this also while looking for the problem!
DevinR528
left a comment
There was a problem hiding this comment.
Wow, I spent hours trying to find this bug I think I just found it. https://github.com/ruma/ruma/blob/main/crates/ruma-api-macros/src/api/request/incoming.rs#L181 just need to add the cfg there then I think that's it?
5d4bd62 to
5d54262
Compare
5d54262 to
f17a1b9
Compare
|
Made a decent amount of progress but there's still a lot to do. I'll also have to benchmark this, it could increase compile times of the api crates due to more parsing and general back-and-forth between the proc-macro and the compiler. |
f17a1b9 to
6dcb797
Compare
6dcb797 to
644970d
Compare
|
Code structure are starting to make sense again in ruma-api-macros, but there's still a bit of work left. Hopefully I can finish this over the next few weeks. |
263a143 to
b1c89ff
Compare
|
One more lifetime issue to figure out, then this should be ready! |
b1c89ff to
388f8ce
Compare
388f8ce to
0c207fb
Compare
|
Merged on the command line. |
Once completed, this should fix the issue identified in #663 (comment) by making the compiler expand
cfgs before these trait implementations are generated.Thanks @DevinR528 for analyzing why #663 causes issues!