Skip to content
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

Implement TypePath for EntityHash #11195

Merged

Conversation

Adamkob12
Copy link
Contributor

@Adamkob12 Adamkob12 commented Jan 3, 2024

Objective

Solution

  • By implementing TypePath for EntityHash, Bevy will automatically implement Reflect for EntityHashMap

Changelog

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to swap to the strategy in #11182 for all of our reflection assertions in tests at some point.

Not for this PR though.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A simple quality-of-life change that makes Bevy easier to use labels Jan 3, 2024
@matiqo15 matiqo15 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 4, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 4, 2024
Merged via the queue into bevyengine:main with commit fe68005 Jan 4, 2024
26 checks passed
BD103 added a commit to BD103/bevy that referenced this pull request Jan 18, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jan 18, 2024
# Objective

- Tests are manually checking whether derived types implement certain
traits. (Specifically in `bevy_reflect.)
- #11182 introduces
[`static_assertions`](https://docs.rs/static_assertions/) to
automatically check this.
- Simplifies `Reflect` test in #11195.
- Closes #11196.

## Solution

- Add `static_assertions` and replace current tests.

---

I wasn't sure whether to remove the existing test or not. What do you
think?
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-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Reflect for EntityHashMap
3 participants