-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
SystemBuilder construction without world access
#21923
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
SystemBuilder construction without world access
#21923
Conversation
167c983 to
83844ac
Compare
8a9da46 to
2981ffa
Compare
|
Linked PR merged, no more blocks |
|
I'm certain this is useful, but is it possible to elaborate on some use cases or examples maybe? (Not necessarily on the code, more like in the pr description) |
good point. It's mostly motivated by #21811, since it requires constructing systems in-place without world access. I'll update the pr description 🙂 |
da64cf7 to
b7a0e30
Compare
Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
9fb514b to
c1adb04
Compare
BuilderSystem for easier system builder constructionSystemBuilder construction without world access
kfc35
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 could not find any issues
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 like the changes, but I would like a test for the core claim "you can now construct SystemBuilder without world access". It's helpful as a reviewer for now, but much more important in the future to ensure that this doesn't accidentally break :)
I would also not complain about more docs on SystemParamBuilder about the intended usage / patterns :) Not blocking though.
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.
Let me know when CI passes :)
Objective
Solution
BuilderSystem, a wrapper which defers state construction until the first run(...params).build_state(&mut world).build_system(|| {}), now you can also call(...params).build_system(|| {})directlyTesting
(will add more tests while fixing review nits)