Deprecated Query::many and many_mut#18183
Merged
alice-i-cecile merged 2 commits intobevyengine:mainfrom Mar 7, 2025
Merged
Conversation
Member
Author
|
@chescock @bushrat011899 @Carter0, review this one for me? |
chescock
approved these changes
Mar 6, 2025
Contributor
chescock
left a comment
There was a problem hiding this comment.
Looks good!
And the only uses I see in docs are on the many methods themselves, so I think you may have updated all the docs after all :).
Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
Member
Author
There's an entry for them in an algorithmic complexity table on Query that I didn't clean up this time :) |
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
Alternative to and closes #18120.
Sibling to #18082, see that PR for broader reasoning.
Folks weren't sold on the name
many(get_many is clearer, and this is rare), and that PR is much more complex.Solution
Query::manyandQuery::many_mutMentions of this in the docs can wait until it's fully removed in the 0.17 cycle IMO: it's much easier to catch the problems when doing that.
Testing
CI!
Migration Guide
Query::manyandQuery::many_muthave been deprecated to reduce panics and API duplication. UseQuery::get_manyandQuery::get_many_mutinstead, and handle theResult.