-
Notifications
You must be signed in to change notification settings - Fork 335
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
Update proc macros to syn v2 #2063
Conversation
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.
Overall, great. The move toward nicer error handling is a huge 👍, and I'm sure contract devs will appreciate the better messages. The refactoring and code deduplication are also good.
I'm a bit apprehensive about the added deps. Details below!
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.
LGTM!
This PR updates all the proc-macro crates to syn v2 and improves the error messages while I was already at it!
Previously error handling was handled with simple
panic!
s which makes for rather ugly error messages since they don't include spans.This update uses the
manyhow
crate to bringanyhow
-like error handling into the proc-macros and produce pretty error messages that point to the exact source of the issue.Before:
After: