Description
Problem
When implementing a new system executor, users (and engine devs) need to ensure a wide array of functionality and behavior is followed. These requirements are scattered across bevy_ecs, leading to "copy-paste an existing executor" as the only sensible strategy.
Similarly, when attempting to make changes to this code, engine devs need to go and carefully manually implement these changes across multiple call sites, being sure to maintain consistency.
Proposed solution
More behavior should be moved out of SystemExecutor::run
, and into new methods on the SystemExecutor
trait. Ideally, SystemExecutor::run
's default implementation can call all of these submethods in order to achieve the correct behavior.
Additionally, evaluate_and_fold_conditions
should be moved out into a public helper and reused across executors.