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] - Separate Query filter access from fetch access during initial evaluation #1977

Closed
wants to merge 1 commit into from

Conversation

cart
Copy link
Member

@cart cart commented Apr 21, 2021

Fixes #1955

See this comment for implementation details / motivation: #1955 (comment)

@cart cart added C-Bug An unexpected or incorrect behavior A-ECS Entities, components, systems, and events labels Apr 21, 2021
#[test]
fn query_filters_dont_collide_with_fetches() {
let mut world = World::new();
world.query_filtered::<&mut i32, Changed<i32>>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add an Added variant here too to spot unusual regressions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the one hand, yes that helps spot unusual regressions. On the other hand, what makes Added more special than With, Without, WithBundle, Or, etc?

Imo we don't need this test to ensure all filter access is implemented correctly (we have other tests for that). We just need to ensure that the filter access doesnt conflict with fetch access (which the test already does).

I think it makes sense to make tests like this small, easy to read, and scoped. So my vote is to leave it as-is (but I concede that there are arguments on both sides).

@cart
Copy link
Member Author

cart commented Apr 22, 2021

bors r+

bors bot pushed a commit that referenced this pull request Apr 22, 2021
…ion (#1977)

Fixes #1955 

See this comment for implementation details / motivation: #1955 (comment)
@bors bors bot changed the title Separate Query filter access from fetch access during initial evaluation [Merged by Bors] - Separate Query filter access from fetch access during initial evaluation Apr 22, 2021
@bors bors bot closed this Apr 22, 2021
ostwilkens pushed a commit to ostwilkens/bevy that referenced this pull request Jul 27, 2021
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-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in query filter
2 participants