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

EntityMut in Queries conflicts with resources #10894

Closed
hymm opened this issue Dec 6, 2023 · 1 comment
Closed

EntityMut in Queries conflicts with resources #10894

hymm opened this issue Dec 6, 2023 · 1 comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled

Comments

@hymm
Copy link
Contributor

hymm commented Dec 6, 2023

Bevy version

0.12.1

What you did

Added a system that accesses a resource and a query with EntityMut

fn bad_system(res: Res<A>, query: Query<EntityMut>) {}

What went wrong

The parameters conflict with each other:

error[B0001]: Query<bevy_ecs::world::entity_ref::EntityMut, ()> in system bevy_github_ci_template::bad_system accesses component(s) bevy_github_ci_template::A in a way that conflicts with a previous system parameter. Consider using `Without<T>` to create disjoint Queries or merging conflicting Queries into a `ParamSet`.

I would have expected them not to conflict, since EntityMut can't access resources.

This is probably happening because EntityMut sets the writes_all boolean on the system access and because Resources and Components share an id space. Not sure if there's an easy way of fixing this beside separating the spaces somehow.

@hymm hymm added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Dec 6, 2023
@hymm
Copy link
Contributor Author

hymm commented Dec 6, 2023

duplicate of #7255

@hymm hymm closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled
Projects
None yet
Development

No branches or pull requests

1 participant