-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
add test checking that types are registered (as far as possible) #6061
add test checking that types are registered (as far as possible) #6061
Conversation
…urce/ReflectComponent registered
.register_type::<bevy_math::Quat>() | ||
.register_type::<bevy_math::Rect>() | ||
.register_type::<Option<bevy_math::Rect>>() | ||
.register_type::<Option<bevy_math::Vec2>>(); |
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.
I chose to only register Option<Vec2>
here. We could in theory register Option<T>
, Vec<T>
etc. for every conceivable type, but since there's no need to do this where the types are defined and it would introduce a lot of unnecessary TypeInfo
into the binary I opted to only register those that are currently in use.
seems related to #5781 |
Yes, that would make half of this PR obsolete. |
Objective
ReflectResource
/ReflectComponent
type dataSolution
Note: this does not lint for types that implement
Reflect
but are not registered. This can't be done at runtime, but maybe as a script running on rustdoc output.