SystemBuilder construction without world access#21923
SystemBuilder construction without world access#21923alice-i-cecile merged 12 commits intobevyengine:mainfrom
SystemBuilder construction without world access#21923Conversation
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.
I could not find any issues
alice-i-cecile
left a comment
There was a problem hiding this comment.
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.
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)