Weak handle migration - #17695
Merged
Merged
Conversation
alice-i-cecile
approved these changes
Feb 5, 2025
alice-i-cecile
left a comment
Member
There was a problem hiding this comment.
Nice! Do we need to note that the UUIDs associated with these handles has changed in the migration guide?
Contributor
Author
I hope that anyone who's been using these internal handles has done so through the constants and not by copying the raw ID, but in case someone hasn't, they should be getting a decent error message about the asset not being found already, so I don't think we need to point this out specifically |
mockersf
approved these changes
Feb 5, 2025
mrchantey
pushed a commit
to mrchantey/bevy
that referenced
this pull request
Feb 17, 2025
# Objective - Make use of the new `weak_handle!` macro added in bevyengine#17384 ## Solution - Migrate bevy from `Handle::weak_from_u128` to the new `weak_handle!` macro that takes a random UUID - Deprecate `Handle::weak_from_u128`, since there are no remaining use cases that can't also be addressed by constructing the type manually ## Testing - `cargo run -p ci -- test` --- ## Migration Guide Replace `Handle::weak_from_u128` with `weak_handle!` and a random UUID.
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
weak_handle!macro added in Addweak_handle!convenience macro #17384Solution
Handle::weak_from_u128to the newweak_handle!macro that takes a random UUIDHandle::weak_from_u128, since there are no remaining use cases that can't also be addressed by constructing the type manuallyTesting
cargo run -p ci -- testMigration Guide
Replace
Handle::weak_from_u128withweak_handle!and a random UUID.