Skip to content

Reflect is broken on hashbrown::HashMap<K, V, FixedHasher> #18943

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

Open
cBournhonesque opened this issue Apr 26, 2025 · 2 comments · May be fixed by #18944
Open

Reflect is broken on hashbrown::HashMap<K, V, FixedHasher> #18943

cBournhonesque opened this issue Apr 26, 2025 · 2 comments · May be fixed by #18944
Labels
A-Reflection Runtime information about types C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Milestone

Comments

@cBournhonesque
Copy link
Contributor

Bevy version

0.16.0

I have #[derive(Reflect)] on a type containing hashbrown::HashMap<K, V, FixedHasher> where K and V are both Reflect. This gives me some compile error saying that the type is not reflectable.

If I switch to bevy::platform::collections::HashMap<K, V> instead, the error disappears.

@cBournhonesque cBournhonesque added A-Reflection Runtime information about types C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 26, 2025
@Victoronz
Copy link
Contributor

Victoronz commented Apr 26, 2025

Reflect is implemented for HashMap via the impl_reflect_for_hashmap! macro, and in the process of creating a wrapper around it in #18694, we unintentionally removed the impl for the hashbrown version I'm pretty sure.

@Victoronz Victoronz added S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! and removed S-Needs-Triage This issue needs to be labelled labels Apr 26, 2025
@MrGVSV
Copy link
Member

MrGVSV commented Apr 26, 2025

I should have a fix up shortly!

@MrGVSV MrGVSV moved this from Open to In Progress in Reflection Apr 26, 2025
@MrGVSV MrGVSV added the P-Regression Functionality that used to work but no longer does. Add a test for this! label Apr 26, 2025
@MrGVSV MrGVSV added this to the 0.16.1 milestone Apr 26, 2025
@MrGVSV MrGVSV linked a pull request Apr 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants