-
Notifications
You must be signed in to change notification settings - Fork 1
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
Overhaul schedule
module.
#142
Conversation
It appears a change in the latest Rust nightly has caused the Edit: Yep, the culprit is this PR. |
Fixed the test output. Not sure why |
Codecov Report
@@ Coverage Diff @@
## dev #142 +/- ##
==========================================
- Coverage 95.08% 94.81% -0.27%
==========================================
Files 73 73
Lines 9991 10223 +232
==========================================
+ Hits 9500 9693 +193
- Misses 491 530 +39
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Completely removes the run-time builder system for schedules. Instead, type-level recursion is used for defining stages. Stages are defined respective of a registry (this was the only way I could get around the need for negative trait bounds, since creating an inverse set of a set of views using a registry can simulate negative trait bounds), which means that stages are actually assembled from the list of tasks when
World::run_schedule()
is called. This should, however, be really cheap, since the type system has already defined the stages. The only work needed to be done at runtime is to reference the tasks into their stages.Therefore, schedules are now defined as heterogeneous lists of tasks. This eliminates the need for the complicated
stages!
macro, allowing us to define a simple heterogeneous list like is done elsewhere.Future work may involve a
Schedule!
macro for generating the type of a schedule. This can make it easier for users to store schedules.Honestly, I'm pretty proud of the type-level recursion stuff going on here. It came out super clean. It basically does the same thing that was being done at run-time previously, but all using the trait system.
Fixes #138.