Expose scheduler builder to ECS World#327
Draft
waynemwashuma wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Expose the
SchedulerBuilderas an application resource to support:Additionally, refactor the scheduling internals to better separate global builder orchestration from per-schedule compilation logic.
Solution
Previously, the
SchedulerBuilderexisted as a private field insideApp:This made the scheduling pipeline inaccessible to external systems such as:
It also tightly coupled schedule compilation state to the builder itself.
Changes made
Exposed
SchedulerBuilderas a resourceThe builder is now registered through
CorePlugin. This allows systems and tooling to access the active scheduling state through the ECS world/resource system. TheAppnow delegates scheduling operations throughSchedulerBuilder.Instanceinstead of maintaining a private instance field.Refactored schedule compilation into
ScheduleContextAs part of exposing the builder globally, the internal scheduling logic was refactored to better isolate per-schedule state.
Introduced
ScheduleContextwhich now owns:SchedulerBuildernow primarily acts as:Why this approach
Exposing the scheduler builder as a resource enables future tooling and runtime features without requiring direct access to the
Appinternals.Examples include:
The
ScheduleContextrefactor supports this by ensuring schedule-local state is isolated and easier to reason about independently.Showcase
N/A
Migration guide
Notes
ScheduleContext.Checklist