-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
System param validation for observers, system registry and run once #15526
Conversation
79103ff
to
8d12cf9
Compare
8d12cf9
to
70789ac
Compare
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.
Simple and effective; I'm pleased that adapting these to the new system param validation framework was so easy.
I have some feedback on docs / error messages that I'd like to resolve before we merge if possible.
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
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.
Nice change! I've suggested a handful of comments to help with understanding why the new tests should fail (resource not available in the world). On first glance I missed that was the cause of the failure and was quite confused!
Co-authored-by: Zachary Harrold <zac@harrold.com.au>
…evyengine#15526) # Objective Fixes bevyengine#15394 ## Solution Observers now validate params. System registry has a new error variant for when system running fails due to invalid parameters. Run once now returns a `Result<Out, RunOnceError>` instead of `Out`. This is more inline with system registry, which also returns a result. I'll address warning messages in bevyengine#15500. ## Testing Added one test for each case. --- ## Migration Guide - `RunSystemOnce::run_system_once` and `RunSystemOnce::run_system_once_with` now return a `Result<Out>` instead of just `Out` --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Zachary Harrold <zac@harrold.com.au>
Objective
Fixes #15394
Solution
Observers now validate params.
System registry has a new error variant for when system running fails due to invalid parameters.
Run once now returns a
Result<Out, RunOnceError>
instead ofOut
.This is more inline with system registry, which also returns a result.
I'll address warning messages in #15500.
Testing
Added one test for each case.
Migration Guide
RunSystemOnce::run_system_once
andRunSystemOnce::run_system_once_with
now return aResult<Out>
instead of justOut