-
Notifications
You must be signed in to change notification settings - Fork 888
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
config_proc_macro: reduce syn's features #6237
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.
These are not sufficient features for this macro. When I build this, I get:
error[E0432]: unresolved import `syn::parse_macro_input`
--> config_proc_macro/src/lib.rs:14:5
|
14 | use syn::parse_macro_input;
| ^^^^^^^^^^^^^^^^^^^^^^ no `parse_macro_input` in the root
|
note: found an item that was configured out
--> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.72/src/lib.rs:465:5
|
465 | mod parse_macro_input;
| ^^^^^^^^^^^^^^^^^
note: the item is gated here
--> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.72/src/lib.rs:464:1
|
464 | #[cfg(all(feature = "parsing", feature = "proc-macro"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and many other errors.
Hmm, yes, this shouldn't work, but locally compiles. Something somewhere merging features?
Looks like you bumped edition to 2021, and it stopped building, nice! |
Bumping edition to 2021 (which sets cargo resolver to 2?) allowed to discover actually wrong feature set of features. |
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.
Thanks!
Edit: Diff-Check passed ✅
This reduces syn's features to "full", "parsing", "proc-macro", "printing" only for that proc macro.
Also bumped edition to 2021.