Skip to content

Conversation

@ZackaryRippee
Copy link

Objective

solving issue #21244

Solution

  • Adding the documentation

Testing

  • Double checked to make sure the scenario is true, and it holds

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 3, 2025
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

I think mdlint is going to have words with you for your formatting, but I like the content for the most part.

The system_registry.rs changes look like they shouldn't be included in this PR.

/// - Have independent change detection
/// - Update ticks even when skipped by conditions
///
/// Later systems in the chain will see changes made by earlier systems while maintaining
Copy link
Member

Choose a reason for hiding this comment

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

Somewhere in here, I think it would be helpful to explicitly call out that this is equivalent to adding before / after system orderings.

/// - Chained calls like `.run_if(a).run_if(b)` evaluate all conditions independently
/// - Single call like `run_if(a.and(b))` short-circuits (`b` won't run if `a` is false)
///
/// For per-system condition evaluation, use [`distributive_run_if`].
Copy link
Contributor

Choose a reason for hiding this comment

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

The "Note" section below already mentions distributive_run_if with a bit more context, so I'd be inclined to leave this line out (or else move the whole "Note" up here).

/// Each individual condition will be evaluated at most once (per schedule run),
/// right before the corresponding system prepares to run.
///
/// # Tick and Change Detection Behavior
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're mentioning that each copy of the system keeps its own ticks, then it might also be worth mentioning that each one also keeps its own parameter state. Notably, MessageReader will have a separate cursor for each one, so copies of on_message may return different values.

And similarly for the mentions of tick state and change detection in fn chain().

/// - Execute in sequential order
/// - Each maintain their own tick state
/// - Have independent change detection
/// - Update ticks even when skipped by conditions
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this right? I thought systems only set their last_run tick when they actually ran, and not when skipped by conditions. Chaining them shouldn't affect that, should it?

@janhohenheim janhohenheim 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 Nov 8, 2025
@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Nov 9, 2025
@alice-i-cecile
Copy link
Member

@ZackaryRippee once CI is passing I'm content to merge this, but you may want to consider Checock's feedback too :)

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-Docs An addition or correction to our documentation S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants