-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Define system param validation on a per-system parameter basis #18504
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
Merged
alice-i-cecile
merged 34 commits into
bevyengine:main
from
alice-i-cecile:per-paramlity
Mar 25, 2025
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
acb4d73
Document that the global error handler is used to handle missing syst…
alice-i-cecile a2e7f3f
Move the fallible system error handling module into bevy_ecs::error
alice-i-cecile c00ad94
Assorted cleanup for fallible_params example
alice-i-cecile 72a368b
Remove ParamWarnPolicy and friends completely
alice-i-cecile 0dcc436
Explain intended fallback behavior for validate_param
alice-i-cecile 71f93cf
Use the GLOBAL_ERROR_HANDLER for validation behavior in SystemParams …
alice-i-cecile 098c8cd
Uncontroversial CI fixes
alice-i-cecile 272ad85
Remove test that cannot be fixed currently
alice-i-cecile d2ffe4a
Use global error handler when observers fail validation
alice-i-cecile bd4fbaa
Add required feature to example
alice-i-cecile 5527f08
Simplify SystemParamValidationError as type of failure is stored in E…
alice-i-cecile 9212623
Merge branch 'main' into globally-fallible-system-params
alice-i-cecile 8b983cb
Remove misleading example comments for now
alice-i-cecile ba3b2f2
Define and use a ValidationBehavior enum
alice-i-cecile 0349503
Clippy
alice-i-cecile a6e3df1
Merge branch 'main' into globally-fallible-system-params
alice-i-cecile 3ae2f34
Remove another outdated comment
alice-i-cecile 28c809a
Fix macro todo thanks to @chescock <3
alice-i-cecile fdae8ae
Properly qualify NonSendMarker import
alice-i-cecile a9d7db2
Merge branch 'globally-fallible-system-params' into per-paramlity
alice-i-cecile 47135ee
Merge remote-tracking branch 'upstream/main' into per-paramlity
alice-i-cecile ca12af8
Revert broken doc comment
alice-i-cecile 9c5e3ec
Fix accidentally removed skipped_system insertion (thanks @chescock)
alice-i-cecile 27ed3f9
Typo
alice-i-cecile 42f6e7e
Polish comments for the example
alice-i-cecile a241587
Fix docs for Single and Populated
alice-i-cecile ffa31ca
Missed if statement
alice-i-cecile d438897
Fix broken doc link
alice-i-cecile 8c3a645
Clippy
alice-i-cecile 5b7a553
Remove unneeded unsafe
alice-i-cecile ad6a567
Merge remote-tracking branch 'origin/per-paramlity' into per-paramlity
alice-i-cecile 1ae7646
Add tests
alice-i-cecile 9ac7652
Clippy please...
alice-i-cecile 9d25684
Encourage short-circuiting
alice-i-cecile File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This
match
is repeated in quite a few places. Would it make sense to put it in a shared method somewhere, maybe onSystem
? Then the only change at the call sites would be changing the method name and passing an extraerror_handler
parameter (unless we want to usedefault_error_handler()
in observers).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.
This is part of the problem outlined in #18453, but yeah, maybe we can extract it.
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 tried extracting this out, but I'm not pleased with how the straightforward approach requires eagerly constructing an
ErrorContext
in the happy path. IMO this is better suited to a proper overhaul of our executor stack.