Skip to content
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

[Merged by Bors] - Query filter types must be ReadOnlyWorldQuery #6008

Closed
wants to merge 5 commits into from

Conversation

targrub
Copy link
Contributor

@targrub targrub commented Sep 18, 2022

Objective

Fixes Issue #6005.

Solution

Replaced WorldQuery with ReadOnlyWorldQuery on F generic in Query filters and QueryState to restrict its trait bound.

Migration Guide

Query filter (F) generics are now bound by ReadOnlyWorldQuery, rather than WorldQuery. If for some reason you were requesting Query<&A, &mut B>, please use Query<&A, With<B>> instead.

@alice-i-cecile
Copy link
Member

Can you change your PR to description to something a bit more descriptive and add a quick migration guide section?

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change labels Sep 18, 2022
@alice-i-cecile
Copy link
Member

Many of these changes seem unrelated; looks like a rebasing issue?

@alice-i-cecile alice-i-cecile added the C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide label Sep 18, 2022
@alice-i-cecile
Copy link
Member

Code changes LGTM now!

For the title, can you put "Query filter types must be ReadOnlyWorldQuery".

For the migration guide, how about:

Migration Guide

Query filter (F) generics are now bound by ReadOnlyWorldQuery, rather than WorldQuery. If for some reason you were requesting Query<&A, &mut B>, please use Query<&A, With<B>> instead.

@targrub targrub changed the title ReadOnlyWorldQuery Query filter types must be ReadOnlyWorldQuery Sep 18, 2022
@inodentry inodentry added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Sep 18, 2022
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Sep 18, 2022
# Objective

Fixes Issue #6005.

## Solution

Replaced WorldQuery with ReadOnlyWorldQuery on F generic in Query filters and QueryState to restrict its trait bound.

## Migration Guide

Query filter (`F`) generics are now bound by `ReadOnlyWorldQuery`, rather than `WorldQuery`. If for some reason you were requesting `Query<&A, &mut B>`, please use `Query<&A, With<B>>` instead.
@bors bors bot changed the title Query filter types must be ReadOnlyWorldQuery [Merged by Bors] - Query filter types must be ReadOnlyWorldQuery Sep 19, 2022
@bors bors bot closed this Sep 19, 2022
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 19, 2022
# Objective

Fixes Issue bevyengine#6005.

## Solution

Replaced WorldQuery with ReadOnlyWorldQuery on F generic in Query filters and QueryState to restrict its trait bound.

## Migration Guide

Query filter (`F`) generics are now bound by `ReadOnlyWorldQuery`, rather than `WorldQuery`. If for some reason you were requesting `Query<&A, &mut B>`, please use `Query<&A, With<B>>` instead.
@targrub targrub deleted the ReadOnlyWorldQuery branch October 26, 2022 19:45
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
# Objective

Fixes Issue bevyengine#6005.

## Solution

Replaced WorldQuery with ReadOnlyWorldQuery on F generic in Query filters and QueryState to restrict its trait bound.

## Migration Guide

Query filter (`F`) generics are now bound by `ReadOnlyWorldQuery`, rather than `WorldQuery`. If for some reason you were requesting `Query<&A, &mut B>`, please use `Query<&A, With<B>>` instead.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Fixes Issue bevyengine#6005.

## Solution

Replaced WorldQuery with ReadOnlyWorldQuery on F generic in Query filters and QueryState to restrict its trait bound.

## Migration Guide

Query filter (`F`) generics are now bound by `ReadOnlyWorldQuery`, rather than `WorldQuery`. If for some reason you were requesting `Query<&A, &mut B>`, please use `Query<&A, With<B>>` instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants