bevyengine / bevyengine/bevy

Rethink query / system access system to better account for `Allows` query filter

Open
#19,086 1 comment 0 reactions 0 assignees View on GitHub
A-ECS C-Code-Quality D-Complex S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
4d 8m
Merged PRs (30d)
147

Description

I don't think this use of "archetypal" access matches the original intent. (Although I don't know whether anyone is actually using it for its original purpose!)

From #11700,

> It would be useful to be able to inspect a QueryState's accesses so we can detect when the data it accesses changes without having to iterate it.
>
> Add the notion of "archetypal" accesses, which are not accessed directly, but whose presence in an archetype affects a query result.

`Allows` is sort of the opposite, as it means `T` no longer affects the query result, even though it does by default on other queries.

I'd gently vote for making this a new kind of access. If we do want to use "archetypal" for this, then we should probably update the doc comment to say something other than "whose presence in an archetype may affect query results".

_Originally posted by @chescock in https://github.com/bevyengine/bevy/issues/18192#issuecomment-2710861109_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.