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

Introduce NonEmptyQuery system param #15302

Open
MiniaczQ opened this issue Sep 19, 2024 · 5 comments
Open

Introduce NonEmptyQuery system param #15302

MiniaczQ opened this issue Sep 19, 2024 · 5 comments
Labels
A-ECS Entities, components, systems, and events C-Enhancement A new feature X-Contentious There are nontrivial implications that should be thought through

Comments

@MiniaczQ
Copy link
Contributor

What problem does this solve or what need does it fill?

There have been many requests to not run systems if there is nothing to process (in a query).
The NonEmptyQuery system param would do exactly that.

What solution would you like?

Add NonEmptyQuery system param that fails validation if query is empty.

@MiniaczQ MiniaczQ added C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled A-ECS Entities, components, systems, and events X-Contentious There are nontrivial implications that should be thought through and removed S-Needs-Triage This issue needs to be labelled labels Sep 19, 2024
@alice-i-cecile
Copy link
Member

I'm in favor of this existing: seems quite useful once #15276 is merged. This is a sibling to #15264.

I'd be interested in adding a NonEmptyEventReader as well, either in the same PR or in a separate one.

@benfrankel
Copy link
Contributor

Bikeshedding, but would QueryNonEmpty be a better name? It'd be next to Query and QuerySingle alphabetically and in code-completion.

@alice-i-cecile
Copy link
Member

I think that's a bit better, yeah.

@MiniaczQ
Copy link
Contributor Author

I prefer proper spelling, all of them will show up when typing "Query"
I'm fine either way

@MiniaczQ
Copy link
Contributor Author

Second thoughts, maybe we should skip Query entirely, assuming we're moving more things to entities, this will naturally show up more so we don't need to be worried about awareness

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-Enhancement A new feature X-Contentious There are nontrivial implications that should be thought through
Projects
None yet
Development

No branches or pull requests

3 participants