Skip to content

Conversation

janis-bhm
Copy link
Contributor

Objective

addresses #19979

Solution

  • Add ScheduleBuildWarning for empty sets
  • When updating schedules, check that each set contains at least one system, and emit a warning if not.

Testing

I've added 4 tests testing different configurations of system sets.

Open Questions

Should this be a boolean configuration or a LogLevel like the other ScheduleBuildWarnings?

@janis-bhm janis-bhm added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 12, 2025
@@ -1752,6 +1764,7 @@ impl ScheduleBuildSettings {
Self {
ambiguity_detection: LogLevel::Ignore,
hierarchy_detection: LogLevel::Warn,
empty_set_detection: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should consider whether this should be on by default or not. Bevy will have some empty sets depending on what features are enabled.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. There's quite a bit of nuance here. Libraries might also deliberately export empty sets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. I think it would be nice if there was a way to distinguish user-inserted sets from library or internal sets, though I'm not sure how that would be accomplished.

@alice-i-cecile alice-i-cecile added the X-Contentious There are nontrivial implications that should be thought through label Sep 12, 2025
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-Usability A targeted quality-of-life change that makes Bevy easier to use S-Needs-Review Needs reviewer attention (from anyone!) to move forward X-Contentious There are nontrivial implications that should be thought through
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants