-
Notifications
You must be signed in to change notification settings - Fork 428
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
Make proc macro support parameter attributes #441
Conversation
integration_tests/juniper_tests/src/codegen/proc_macro_param_attrs.rs
Outdated
Show resolved
Hide resolved
I see the tests on stable and beta all fail because
Not quite sure how to resolve that 🤔 |
@theduke @LegNeato would one of you be able to skim this and let me know if I'm missing something obvious? If all is good I'll look into updating all the other code using the old style of customising arguments. But just in case something needs to be changed I would like some confirmation before starting that. |
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.
Looks good to me!
I'm actually also fine with removing the old format right away without a deprecation period, and publishing it with the async release.
This should be ready to go now. I have removed support for the old style of customising args and updated all the existing code to use the new style. I was also able to get renaming working. All thats left is wait for 1.39 to ship. Let me know if you want me to squash the commits 😊 |
I also took the liberty of adding assert-json-diff as a dev dependency. It makes comparing Full disclosure: I maintain assert-json-diff. |
The formatting seems to have removed some of these? |
@LegNeato I guess those todos were adding in the async-await branch. I created this branch from master. |
This reverts commit 2858764. Apparently rustfmt removes parameter attributes
Hm so it seems rustfmt on stable (1.4.8-stable) removes parameter attributes. That is why lots of tests failed after I formatted. I guess we can either format on nightly, or wait for a new version of rustfmt to come out that doesn't remove parameter attributes. I have reverted the formatting commit so at least |
The fix should be on latest stable, right? |
@LegNeato Doesn't seem like it
|
How about now? 😁 |
@LegNeato I'm a bit behind on some OSS stuff. Hoping to get time this weekend to look into things. Great that async/await support is merged! 🎊 |
I see has drifted quite far behind the current master. I'll try to get things up to date so we can finally get it merged. |
Checking in a year later -- is this still planned? 😉 |
Ah sorry. Dropped the ball on this one. Unfortunately I don't currently have the bandwidth to drive it home. I'll leave this PR open in case some one wants to pick it up but maintainers would feel free to close it. |
No worries, it seems like most of the content is already in the MR -- so thanks for that!
I'll try to take a look, and see if I can get it in shape for a review. |
Yes. Good luck 😊 |
Hmmm, I started the rebasing effort, but seems like some tests have already been enabled here: juniper/juniper/src/macros/tests/args.rs Line 90 in c78045c
I realize that this MR also cleans up a lot of the other content, but does this mean the core functionality is available in master - and the docs just need to be updated? |
Done in #971 |
Fixes #421.
I decided to add https://crates.io/crates/proc-macro-error as mentioned here. It made returning a nice error significantly easier.
TODO
cargo test
currently produces quite a few deprecation warnings.rename = "..."
work. @theduke not quite sure how to handle this one. Got a hint?