Report execution order ambiguities in tests #3818
Labels
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
What problem does this solve or what need does it fill?
System execution order ambiguities are particularly dangerous in tests, as they lead to flakiness.
The
ReportExecutionOrderAmbiguities
resource however does not report its results when run inside of a test using manualApp.update
calls.What solution would you like?
Create a method on both
App
andStage
(post-stageless, justSchedule
) that fetches execution order ambiguities and stores them in an object for inspection.Then, use
dbg!(app.execution_order_ambiguities())
in your tests when ambiguous execution order is suspected.What alternative(s) have you considered?
Allow users to forbid execution order ambiguities and panic if any (local) ambiguities are detected.
This would also be useful, but not quite as flexible for this use case.
Additional context
Any PR attempting this should be based off of
#2766#4299, which massively improves this system.The text was updated successfully, but these errors were encountered: