-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix registering all reflection types that are components as reflection components #16800
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.
Looks good!
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.
That's a neat program! We'd love to do something similar for the Bevy linter if you’re ever interested in helping there :)
Import merge conflict was a bit tricky; let's see if CI likes that. |
…erived using feature-flag checks (cfg_attr).
My code scanner had a bug where it missed #[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Debug))] since it only scanned for top-level derives. I found only two instances of the problem this PR fixes, both in the gamepad code. I also pushed the fix to my code scanner. |
Thanks for cleaning this up <3 Merging. |
…n components (bevyengine#16800) # Objective Fixes bevyengine#16659 ## Solution - I just added all the `#[reflect(Component)]` attributes where necessary. ## Testing I wrote a small program that scans the bevy code for all structs and enums that derive `Component` and `Reflect`, but don't have the attribute `#[reflect(Component)]`. I don't know if this testing program should be part of the testing suite of bevy. It takes a bit of time to scan the whole codebase. In any case, I've published it [here](https://github.com/anlumo/bevy-reflect-check). --------- Co-authored-by: Alice Cecile <[email protected]>
Objective
Fixes #16659
Solution
#[reflect(Component)]
attributes where necessary.Testing
I wrote a small program that scans the bevy code for all structs and enums that derive
Component
andReflect
, but don't have the attribute#[reflect(Component)]
.I don't know if this testing program should be part of the testing suite of bevy. It takes a bit of time to scan the whole codebase. In any case, I've published it here.