Conversation
alice-i-cecile
left a comment
There was a problem hiding this comment.
I like this: there's clearly a need for this information, as shown by our own duplicated error type.
That said, this is technically breaking, and needs a migration guide.
|
It looks like your PR is a breaking change, but you didn't provide a migration guide. Could you add some context on what users should update when this change get released in a new version of Bevy? |
|
While yes this is technically breaking compared to |
pablo-lua
left a comment
There was a problem hiding this comment.
This changes are great and can very easily improve the code quality with reflection in the future.
|
@pablo-lua, if you're comfortable, feel free to leave a full Approval :) Like we talk about in CONTRIBUTING.md, community approvals are really vital for Bevy! |
|
Great, will do that :) |
Objective
Fix #11657
Solution
Add a
ReflectKindenum, addReflect::reflect_kindwhich returns aReflectKind, and addkindmethod implementions toReflectRef,ReflectMut, andReflectOwned, which returns aReflectKind.I also changed
AccessErrorto use this new struct instead of it's ownTypeKindstruct.Changelog
ReflectKind, an enumeration over the kinds of a reflected type without its data.Reflect::reflect_kind(with default implementation)kindmethod onReflectRef,ReflectMut, andReflectOwnedwhich gives their kind without any information, as aReflectKind