-
-
Notifications
You must be signed in to change notification settings - Fork 557
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
Throw compile errors when unexpected proc_macros attributes are provided #394
Comments
Create a whitelist for all supported |
I was researching this issue and I believe there should be something like
where all the attributes would pass from like Is it because we are using Thanks. |
Hey @Diwakar-Gupta, thanks for the investigation!! First, every procedural macros is self contained in a For example, sea-orm/sea-orm-macros/src/derives/active_enum.rs Lines 12 to 186 in 9f6b566
Each procedural macros starts by parsing the inputting Ideally we want each procedural macro should be testable. With that in mind we better implement it in two stages:
Then, we can test the parsing and code generating parts separately and thoroughly. We already has the code generating inplace, we just need to rewrite all of them. I think https://github.com/TedDriggs/darling could helps us do the parsing. Does that make sense to you? |
Thanks for the explanation @billy1624 What I understood is each This parsing step can be replaced with use of We wanted to test both
and this too right. |
Sounds like we have a plan now :) |
Related to #391
The text was updated successfully, but these errors were encountered: