You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A-LinterRelated to the linter and custom lintsC-FeatureMake something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!
// Will panic: an entity could have both `Player` and `Enemy` components.fnrandomize_health(player_query:Query<&mutHealth,With<Player>>,enemy_query:Query<&mutHealth,With<Enemy>>,){// ...}
Due to limitations in Rust and how Bevy is architected, conflicts are a runtime error and not a compile-time error.
To provide a better development experience, the linter should error against conflicting queries. Query conflicts are computed with the private assert_component_access_compatibility() function, so we may also be able steal permanently borrow some logic from that.
The text was updated successfully, but these errors were encountered:
BD103
added
A-Linter
Related to the linter and custom lints
C-Feature
Make something new possible
D-Complex
Quite challenging from either a design or technical perspective. Ask for help!
labels
Feb 3, 2025
A-LinterRelated to the linter and custom lintsC-FeatureMake something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!
Bevy does not let systems break Rust's mutability rules, and will panic if two queries overlap:
Due to limitations in Rust and how Bevy is architected, conflicts are a runtime error and not a compile-time error.
To provide a better development experience, the linter should error against conflicting queries. Query conflicts are computed with the private
assert_component_access_compatibility()
function, so we may also be ablestealpermanently borrow some logic from that.The text was updated successfully, but these errors were encountered: