Add Explicit Ordering for DefaultPlugins Systems#9828
Closed
bushrat011899 wants to merge 1 commit intobevyengine:mainfrom
Closed
Add Explicit Ordering for DefaultPlugins Systems#9828bushrat011899 wants to merge 1 commit intobevyengine:mainfrom
DefaultPlugins Systems#9828bushrat011899 wants to merge 1 commit intobevyengine:mainfrom
Conversation
alice-i-cecile
requested changes
Sep 17, 2023
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
We should avoid adding new dependencies between crates just for ambiguity resolution. Instead, I think we should add a plugin to DefaultPlugins, whose only job is to resolve these ambiguities using public labels.
Member
|
Instead of ordering everything, some systems could also be added to ambiguity sets to allow for more parallelism. E.g. the animation system might be OK with running in parallel to layout systems. |
Contributor
|
FYI I have a couple PR's that will affect ambiguitites.
|
Member
|
Closing in favor of #10411<3 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Objective
Solution
beforeandafterstatements as required to remove system order ambiguity.Notes
This PR is a bit on the rough side of things and probably serves better as a reference point for the kind of work required to properly resolve #9511. A number of system ambiguities were between areas of Bevy that previously didn't need to reference each other. In those instances, I chose to add the crate and resolve the ambiguity directly. A better approach would probably be to add some better sets for sharing between these crates.
Also, I had some troubles on my machine actually diagnosing the original ambiguity errors using the
nondeterministic_system_orderexample. I ended up working around this issue by explicitly configuring all the schedules run byMainseparately:If this is merged, I do think the CI tests should be updated to include ambiguity detection to prevent regression.