-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Move EntityHash
related types into bevy_ecs
#11498
Move EntityHash
related types into bevy_ecs
#11498
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.
LGTM, though the migration guide should mention that EntityHashMap now only has one generic argument (the value type), instead of two.
The migration guide could be changed to mention what needs to be adapter for the new changes, rather than the new changes themself. For example:
|
CI failure is real: looks like you forgot to feature flag imports. |
It doesn't look like my problem. If it is, what am I doing wrong? |
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 should be the cause of the CI failure.
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.
Second time's the charm.
# Objective - Follow-up on some changes in #11498 - Unblock using `Identifier` to replace `ComponentId` internals. ## Solution - Implement the same `Reflect` impls from `Entity` onto `Identifier` as they share same/similar purposes, ## Testing - No compile errors. Currently `Identifier` has no serialization impls, so there's no need to test a serialization/deserialization roundtrip to ensure correctness. --- ## Changelog ### Added - Reflection implementations on `Identifier`.
# Objective `EntityHash` and related types were moved from `bevy_utils` to `bevy_ecs` in #11498, but seemed to have been accidentally reintroduced a week later in #11707. ## Solution Remove the old leftover code. --- ## Migration Guide - Uses of `bevy::utils::{EntityHash, EntityHasher, EntityHashMap, EntityHashSet}` now have to be imported from `bevy::ecs::entity`.
Objective
Reduce the size of
bevy_utils
(#11478)Solution
Move
EntityHash
related types intobevy_ecs
. This also allows us access toEntity
, which means we no longer needEntityHashMap
's first generic argument.Changelog
bevy::utils::{EntityHash, EntityHasher, EntityHashMap, EntityHashSet}
intobevy::ecs::entity::hash
.EntityHashMap
's first generic argument. It is now hardcoded to always beEntity
.Migration Guide
bevy::utils::{EntityHash, EntityHasher, EntityHashMap, EntityHashSet}
now have to be imported frombevy::ecs::entity::hash
.EntityHashMap
no longer have to specify the first generic parameter. It is now hardcoded to always beEntity
.