bevy_utils: Export generate_composite_uuid
utility function
#10496
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
The
generate_composite_uuid
utility function hidden inbevy_reflect::__macro_exports
could be generally useful to users.For example, I previously relied on
Hash
to generate au64
to create a deterministicHandleId
. In v0.12,HandleId
has been replaced byAssetId
which now requires aUuid
, which I could generate with this function.Solution
Relocate
generate_composite_uuid
frombevy_reflect::__macro_exports
tobevy_utils::uuid
.It is still re-exported under
bevy_reflect::__macro_exports
so there should not be any breaking changes (although, users should generally not rely on pseudo-private/hidden modules like__macro_exports
).I chose to keep it in
bevy_reflect::__macro_exports
so as to not clutter up our public API and to reduce the number of changes in this PR. We could have also marked the export as#[doc(hidden)]
, but personally I like that we have a dedicated module for this (makes it clear what is public and what isn't when just looking at the macro code).Changelog
generate_composite_uuid
tobevy_utils::uuid
and made it public