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

Enable skipping/running SystemSets during Stepping #13219

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

cBournhonesque
Copy link
Contributor

Objective

Solution

  • Instead, I think it's possible to extend the existing system stepping machinery to achieve what I want. It should not be a problem to require system-stepping since run_system_set() would mostly be used inside tests.
    As a bonus, the new solution provides more control, since it's possible to run all the systems in a set except for one, etc.

  • Add functions in SystemStepping to be able to add SystemStepping instructions (AlwaysRun, NeverRun) for an entire SystemSet. In those cases, system-stepping will issue instructions for every system that is contained inside the Set.

  • For ease of computation I had to add a variable sets_to_systems in the ScheduleGraph (which is gated behind the system-stepping feature), but it's requiring a lot of #[cfg(feature(bevy_debug_stepping))] statements elsewhere in the code. I wonder if there's a better solution?

Testing

  • Added some unit tests to check that system-set stepping instructions work properly

Changelog

Added

Extended SystemStepping to be able to Skip/Step-through all the systems of a SystemSet

@cBournhonesque cBournhonesque added A-ECS Entities, components, systems, and events D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels May 3, 2024
@cBournhonesque cBournhonesque added the X-Contentious There are nontrivial implications that should be thought through label May 19, 2024
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 D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes X-Contentious There are nontrivial implications that should be thought through
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce an app::run_system_set() function
1 participant