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
@ItsDoot ItsDoot added the M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Oct 20, 2025
Copy link
Contributor

@hymm hymm left a comment

Choose a reason for hiding this comment

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

makes sense to me

@hymm hymm added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 20, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 20, 2025
Merged via the queue into bevyengine:main with commit 3da19b0 Oct 20, 2025
40 checks passed
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 M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide 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