Skip to content

Conversation

@ItsDoot
Copy link
Contributor

@ItsDoot ItsDoot commented Jan 5, 2026

Objective

Same deal as #22331 but for the children! macro.

Solution

Make children! delegate to related! in order to:

  • Remove the need to import SpawnRelated when using it.
  • Reduce code duplication.
  • Make children! look less special-cased (it's just related! with a bevy-provided relation type).

Testing

Removed imports of SpawnRelated where it's no longer needed, to prove it works.

@ItsDoot ItsDoot added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Domain-Agnostic Can be tackled by anyone with generic programming or Rust skills S-Needs-Review Needs reviewer attention (from anyone!) to move forward D-Macros Code that generates Rust code labels Jan 5, 2026
@ItsDoot ItsDoot added this to the 0.18 milestone Jan 5, 2026
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior 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 Jan 5, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 5, 2026
Merged via the queue into bevyengine:main with commit 11d485b Jan 5, 2026
55 checks passed
cart pushed a commit that referenced this pull request Jan 8, 2026
…elated!` (#22384)

# Objective

Same deal as #22331 but for the `children!` macro.

## Solution

Make `children!`  delegate to `related!` in order to:
- Remove the need to import `SpawnRelated` when using it.
- Reduce code duplication.
- Make `children!` look less special-cased (it's just `related!` with a
bevy-provided relation type).

## Testing

Removed imports of `SpawnRelated` where it's no longer needed, to prove
it works.
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-Bug An unexpected or incorrect behavior C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Domain-Agnostic Can be tackled by anyone with generic programming or Rust skills D-Macros Code that generates Rust code D-Trivial Nice and easy! A great choice to get started with Bevy 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