-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Formatting of system schedule cycle detected error is very hard to follow when many systems form a cycle #7367
Copy link
Copy link
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with Bevy
Description
Bevy version
#7267, using the new schedule_v3 module.
Problem
When cycles are detected, the error message is very hard to read:
schedule contains at least 1 cycle(s) -- cycle(s) found within:
---- 0: ["bevy_asset::assets::Assets<bevy_animation::AnimationClip>::asset_event_system", "bevy_asset::assets::Assets<bevy_audio::audio_output::AudioSink>::asset_event_system", "bevy_asset::assets::Assets<bevy_audio::audio_source::AudioSource>::asset_event_system", "bevy_asset::assets::Assets<bevy_gltf::GltfMesh>::asset_event_system", "bevy_asset::assets::Assets<bevy_gltf::GltfPrimitive>::asset_event_system", "bevy_asset::assets::Assets<bevy_gltf::GltfNode>::asset_event_system", "bevy_asset::assets::Assets<bevy_gltf::Gltf>::asset_event_system", "bevy_asset::assets::Assets<bevy_pbr::pbr_material::StandardMaterial>::asset_event_system", "bevy_asset::assets::Assets<bevy_text::font_atlas_set::FontAtlasSet>::asset_event_system", "bevy_asset::assets::Assets<bevy_text::font::Font>::asset_event_system", "bevy_asset::assets::Assets<bevy_sprite::mesh2d::color_material::ColorMaterial>::asset_event_system", "bevy_asset::assets::Assets<bevy_sprite::texture_atlas::TextureAtlas>::asset_event_system", "bevy_asset::assets::Assets<bevy_render::texture::image::Image>::asset_event_system", "bevy_asset::assets::Assets<bevy_render::mesh::mesh::skinning::SkinnedMeshInverseBindposes>::asset_event_system", "bevy_asset::assets::Assets<bevy_render::mesh::mesh::Mesh>::asset_event_system", "bevy_asset::assets::Assets<bevy_render::render_resource::shader::Shader>::asset_event_system", "bevy_asset::assets::Assets<bevy_scene::scene::Scene>::asset_event_system", "bevy_asset::assets::Assets<bevy_scene::dynamic_scene::DynamicScene>::asset_event_system", "bevy_pbr::light::check_light_mesh_visibility", "bevy_pbr::light::update_point_light_frusta", "bevy_pbr::light::update_spot_light_frusta", "bevy_pbr::light::assign_lights_to_clusters", "bevy_pbr::light::update_directional_light_frusta", "bevy_render::view::visibility::check_visibility", "bevy_render::view::visibility::update_frusta<bevy_render::camera::projection::OrthographicProjection>", "bevy_render::view::visibility::update_frusta<bevy_render::camera::projection::PerspectiveProjection>", "bevy_render::view::visibility::update_frusta<bevy_render::camera::projection::Projection>", "bevy_ui::update::update_clipping_system", "bevy_transform::systems::propagate_transforms", "bevy_transform::systems::sync_simple_transforms", "bevy_animation::animation_player", "bevy_audio::audio_output::play_queued_audio_system<bevy_audio::audio_source::AudioSource>", "bevy_pbr::light::add_clusters", "bevy_ui::stack::ui_stack_system", "bevy_ui::flex::flex_node_system", "bevy_ui::widget::image::update_image_calculated_size_system", "bevy_ui::widget::text::text_system", "bevy_text::text2d::update_text2d_layout", "bevy_render::view::visibility::visibility_propagate_system", "bevy_render::camera::camera::camera_system<bevy_render::camera::projection::PerspectiveProjection>", "bevy_render::camera::camera::camera_system<bevy_render::camera::projection::OrthographicProjection>", "bevy_render::camera::camera::camera_system<bevy_render::camera::projection::Projection>", "bevy_winit::system::despawn_window", "bevy_winit::system::changed_window", "bevy_window::system::exit_on_all_closed", "bevy_ecs::scheduling::executor::apply_system_buffers"]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: DependencyCycle', crates/bevy_ecs/src/scheduling/schedule.rs:181:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceThese don't have the appropriate line breaks in the terminal.
Proposed fixes
- Use double line breaks for each cycle, and single line breaks for each system.
- Use short-names by default, with an option to see the full name.
- List the total number of disconnected cycles at the top of the error message.
- List the sets that each system is in.
Ambiguity detection recently had similar changes made; check that code for breadcrumbs.
If some of these fixes end up being more involved, submit the easy ones in their own PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with Bevy
