mvlabat / bevy_egui

This crate provides an Egui integration for the Bevy game engine. 🇺🇦 Please support the Ukrainian army: https://savelife.in.ua/en/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System order ambiguities

Vrixyz opened this issue · comments

Running bevy's system order ambiguities detection reports several ambiguities:

2024-06-20T08:59:49.675123Z  WARN bevy_ecs::schedule::schedule: Schedule PostUpdate has ambiguities.
8 pairs of systems with conflicting data access have indeterminate execution order. Consider adding `before`, `after`, or `ambiguous_with` relationships between these:
 -- bevy_pbr::light::add_clusters (in set AddClusters) and bevy_render::camera::camera::camera_system<bevy_render::camera::projection::PerspectiveProjection> (in set CameraUpdateSystem)
    conflict on: ["bevy_render::camera::camera::Camera"]
 -- bevy_pbr::light::add_clusters (in set AddClusters) and bevy_render::camera::camera::camera_system<bevy_render::camera::projection::OrthographicProjection> (in set CameraUpdateSystem)
    conflict on: ["bevy_render::camera::camera::Camera"]
 -- bevy_pbr::light::add_clusters (in set AddClusters) and bevy_render::camera::camera::camera_system<bevy_render::camera::projection::Projection> (in set CameraUpdateSystem)
    conflict on: ["bevy_render::camera::camera::Camera"]
 -- bevy_render::camera::camera::camera_system<bevy_render::camera::projection::PerspectiveProjection> (in set CameraUpdateSystem) and bevy_egui::systems::process_output_system (in set ProcessOutput)
    conflict on: ["bevy_window::window::Window"]
 -- bevy_render::camera::camera::camera_system<bevy_render::camera::projection::OrthographicProjection> (in set CameraUpdateSystem) and bevy_egui::systems::process_output_system (in set ProcessOutput)
    conflict on: ["bevy_window::window::Window"]
 -- bevy_render::camera::camera::camera_system<bevy_render::camera::projection::Projection> (in set CameraUpdateSystem) and bevy_egui::systems::process_output_system (in set ProcessOutput)
    conflict on: ["bevy_window::window::Window"]
 -- bevy_winit::accessibility::update_accessibility_nodes (in set Update) and bevy_egui::systems::process_output_system (in set ProcessOutput)
    conflict on: ["bevy_window::window::Window"]
 -- bevy_egui::systems::process_output_system (in set ProcessOutput) and bevy_window::system::exit_on_all_closed
    conflict on: ["bevy_window::window::Window"]

(detected while working on dimforge/bevy_rapier#536 )

Hi, thanks for bringing this to attention! I just double-checked: it seems that we aren't using the process_output_system system in a way that would have some undesired effects because of inconsistent ordering. The only way we access the Window component is to set a cursor for it (if I haven't missed anything).

So I guess we can just put .ambiguous_with(...) and call it a day?

Thanks for taking a look, that's my understanding too, I'd welcome a comment accompanying any ambiguous_with because it's not too trivial to track.

The rest seems to originate from bevy ; for information I'd love to clean bevy ambiguities too :') bevyengine/bevy#13950