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 suggestion: filtering SystemParams allowed in a SystemSet #104

Open
Exsolutus opened this issue Sep 24, 2024 · 3 comments
Open

Lint suggestion: filtering SystemParams allowed in a SystemSet #104

Exsolutus opened this issue Sep 24, 2024 · 3 comments

Comments

@Exsolutus
Copy link

I'm looking for a way to filter the SystemParams allowed on systems added to a given SystemSet. @alice-i-cecile suggested I open a lint proposal here to discuss what a lint for this would look like.

Ideally the user would be able to define a SystemParam whitelist/blacklist filter on a SystemSet. The lint would then need to validate systems against this filter and deny the addition of that system to the set. This filtering probably also needs runtime validation, but the lint would be helpful ergonomically.

@alice-i-cecile
Copy link
Member

I do think this is quite useful: making sure you don't put gameplay code in the wrong state or so in is important.

We could also consider tying this sort of thing directly to states, or moving it fully to runtime schedule inspection.

@Exsolutus
Copy link
Author

Exsolutus commented Sep 24, 2024

How would it work using states?

For runtime schedule inspection, using bevyengine/bevy#11094 is probably a good idea.

@alice-i-cecile
Copy link
Member

So, I think the states variant is probably a different lint, but being able to say "you should not be accessing certain data in a certain state" is an interesting customizable correctness check. Probably quite hard to configure though, so maybe not worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants