-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Generic system config #17962
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
Generic system config #17962
Conversation
ItsDoot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass done! Good work so far!
However, one thing I don't mention below is that the impl_system_collection and impl_system_set_collection macros that provide implementations for tuples should be merged into a single impl_node_type_collection macro that uses a T: NodeType bound instead of hardcoding to ScheduleSystem or InternedSystemSet. It should be as simple as taking one of the macros, renaming it, adding the bounds, and using T in place of either of the aforementioned types.
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
Co-authored-by: Christian Hughes <9044780+ItsDoot@users.noreply.github.com>
ItsDoot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
|
Yup, updated NodeConfigs and NodeConfig to ScheduleConfigs, although kept NodeType as is. |
| } | ||
| } | ||
|
|
||
| /// Stores data to differentiate different Node types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs doc links to Node.
alice-i-cecile
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the net effect here, but IMO the NodeType name is quite confusing, and not a good fit for a trait. How would Schedulable work for you?
Some little doc nits too :)
Renamed and updated some docs :> |
|
Manually resolved merge conflicts. You might need a cargo fmt in there. Ping me to re-attempt the merge if needed. |
Head branch was pushed to by a user without write access
i think we can reattempt it now |
|
Awesome, thanks :) I appreciate it: merge conflicts can be super annoying on a project this big. |
|
FYI the migration guide doesn't seem to be up to date based on some naming changes made later. |
Updated |
Objective
Prevents duplicate implementation between IntoSystemConfigs and IntoSystemSetConfigs using a generic, adds a NodeType trait for more config flexibility (opening the door to implement #14195?).
Solution
Followed writeup by @ItsDoot:
https://hackmd.io/@doot/rJeefFHc1x
Removes IntoSystemConfigs and IntoSystemSetConfigs, instead using IntoNodeConfigs with generics.
Testing
Pending
Showcase
N/A
Migration Guide
SystemSetConfigs -> ScheduleConfigs
SystemConfigs -> ScheduleConfigs
IntoSystemSetConfigs -> IntoScheduleConfigs<InternedSystemSet, M>
IntoSystemConfigs -> IntoScheduleConfigs<ScheduleSystem, M>