Skip to content
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

Explicit execution order ambiguities API #1469

Merged
merged 3 commits into from
Feb 18, 2021
Merged

Conversation

Ratysz
Copy link
Contributor

@Ratysz Ratysz commented Feb 18, 2021

This API allows marking systems as exempt from ambiguity detection with other systems with the same mark. E.g., this will not report any ambiguities:

SystemStage::parallel()
    .with_system(conflicts_with_everything.system().label("0").before("1").before("2"))
    .with_system(conflicts_with_everything.system().label("1").in_ambiguity_set("a"))
    .with_system(conflicts_with_everything.system().label("2").in_ambiguity_set("a"))
    .with_system(conflicts_with_everything.system().label("3").after("1").after("2"))

It's a stopgap solution until some form of #1375 is implemented.

@Ratysz Ratysz added core A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Feb 18, 2021
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this: it will help us prepare for 0.5 by cleaning up the default system ambiguities, and we'll still need this tool once we have archetype invariants.

Are you planning to integrate this with #1423 or just leave these as stringly-typed until we get #1375? I can see either option being defensible.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 18, 2021
@alice-i-cecile alice-i-cecile added this to the Bevy 0.5 milestone Feb 18, 2021
@Ratysz
Copy link
Contributor Author

Ratysz commented Feb 18, 2021

Are you planning to integrate this with #1423 or just leave these as stringly-typed until we get #1375?

Yes, definitely - it's easy enough to warrant doing this even for a "temporary" solution. This could be left out of #1423, for expediency, I'll just do a follow-up PR when it lands. Or it lands before this and I'll rebase 🤷‍♂️

@cart
Copy link
Member

cart commented Feb 18, 2021

I think this is good to go (once we resolve the one open thread)

@Ratysz
Copy link
Contributor Author

Ratysz commented Feb 18, 2021

Ah, dang, rustfmt snuck in an unrelated change. It should be fine, just annoying.

@cart cart merged commit 82d0e84 into bevyengine:master Feb 18, 2021
TheRawMeatball pushed a commit to TheRawMeatball/bevy that referenced this pull request Feb 18, 2021
Explicit execution order ambiguities API.
@Ratysz Ratysz deleted the ambiguity_sets branch February 18, 2021 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants