Skip to content

Conversation

ItsDoot
Copy link
Contributor

@ItsDoot ItsDoot commented Oct 20, 2025

Objective

Solution

  • Moved ScheduleGraph::topsort_graph to DiGraph::toposort.
  • Added DiGraphToposortError with Loop and Cycle variants, which is wrapped to replace ScheduleBuildError::HierarchyLoop, HierarchyCycle, DependencyLoop, and DependencyCycle.
  • Added ScheduleBuildError::FlatDependencySort variant to detect issues specifically with the flattened dependency graph.
  • Removed ReportCycles: DiGraph::toposort returns an error that should be wrapped at the callsite, negating the need for this type.
  • Moved simple_cycles_in_component onto DiGraph (formerly a free-floating function).

Testing

Updated and reused current tests.

@ItsDoot ItsDoot added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 20, 2025
@ItsDoot ItsDoot force-pushed the schedule/cleanup-7 branch from d5549fc to 6d0622d Compare October 20, 2025 03:34
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-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants