Skip to content

Component derive macro should allow multiple #[require(...)] attributes. #16341

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

Closed
BenjaminBrienen opened this issue Nov 11, 2024 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Design This issue requires design work to think about how it would best be accomplished

Comments

@BenjaminBrienen
Copy link
Contributor

Future PR: Might be nice to modify the Component derive macro to allow multiple #[require(...)] attributes (if that's possible?). Would make cases like this cleaner.

Originally posted by @bushrat011899 in #16322 (comment)

@BenjaminBrienen BenjaminBrienen added A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Design This issue requires design work to think about how it would best be accomplished labels Nov 11, 2024
@bushrat011899
Copy link
Contributor

To my pleasant surprise, this actually already works. The proc-macro gracefully handles an arbitrary number of #[require(...)] attributes, appropriately combining them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

No branches or pull requests

2 participants