Move hashbrown and foldhash out of bevy_utils#17460
Merged
alice-i-cecile merged 7 commits intobevyengine:mainfrom Jan 23, 2025
Merged
Move hashbrown and foldhash out of bevy_utils#17460alice-i-cecile merged 7 commits intobevyengine:mainfrom
hashbrown and foldhash out of bevy_utils#17460alice-i-cecile merged 7 commits intobevyengine:mainfrom
Conversation
Contributor
Author
|
Marking as |
BenjaminBrienen
approved these changes
Jan 20, 2025
Carter0
approved these changes
Jan 21, 2025
Contributor
Author
|
I'll get these conflicts fixed now... |
Contributor
Author
|
Conflicts resolved @alice-i-cecile! |
mrchantey
pushed a commit
to mrchantey/bevy
that referenced
this pull request
Feb 4, 2025
# Objective - Contributes to bevyengine#16877 ## Solution - Moved `hashbrown`, `foldhash`, and related types out of `bevy_utils` and into `bevy_platform_support` - Refactored the above to match the layout of these types in `std`. - Updated crates as required. ## Testing - CI --- ## Migration Guide - The following items were moved out of `bevy_utils` and into `bevy_platform_support::hash`: - `FixedState` - `DefaultHasher` - `RandomState` - `FixedHasher` - `Hashed` - `PassHash` - `PassHasher` - `NoOpHash` - The following items were moved out of `bevy_utils` and into `bevy_platform_support::collections`: - `HashMap` - `HashSet` - `bevy_utils::hashbrown` has been removed. Instead, import from `bevy_platform_support::collections` _or_ take a dependency on `hashbrown` directly. - `bevy_utils::Entry` has been removed. Instead, import from `bevy_platform_support::collections::hash_map` or `bevy_platform_support::collections::hash_set` as appropriate. - All of the above equally apply to `bevy::utils` and `bevy::platform_support`. ## Notes - I left `PreHashMap`, `PreHashMapExt`, and `TypeIdMap` in `bevy_utils` as they might be candidates for micro-crating. They can always be moved into `bevy_platform_support` at a later date if desired.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Solution
hashbrown,foldhash, and related types out ofbevy_utilsand intobevy_platform_supportstd.Testing
Migration Guide
bevy_utilsand intobevy_platform_support::hash:FixedStateDefaultHasherRandomStateFixedHasherHashedPassHashPassHasherNoOpHashbevy_utilsand intobevy_platform_support::collections:HashMapHashSetbevy_utils::hashbrownhas been removed. Instead, import frombevy_platform_support::collectionsor take a dependency onhashbrowndirectly.bevy_utils::Entryhas been removed. Instead, import frombevy_platform_support::collections::hash_maporbevy_platform_support::collections::hash_setas appropriate.bevy::utilsandbevy::platform_support.Notes
PreHashMap,PreHashMapExt, andTypeIdMapinbevy_utilsas they might be candidates for micro-crating. They can always be moved intobevy_platform_supportat a later date if desired.