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

Lint for invalid overlapping data access #5

Open
MinerSebas opened this issue Feb 4, 2022 · 0 comments
Open

Lint for invalid overlapping data access #5

MinerSebas opened this issue Feb 4, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@MinerSebas
Copy link
Owner

To follow Rust's mutability Rules, Bevy dissallows usage of systems that would break them:

fn resource_system(res: Res<A>, res_mut: ResMut<A>) {}
fn query_system(query: Query<&B>, query_mut: Query<&mut B>) {}

Sadly Bevy can only check this at runtime, where it panics if it finds any conflict.

bevy_lint should Lint systems, to provide a check at "compile-time".

@MinerSebas MinerSebas added the enhancement New feature or request label Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant