Skip to content

Conversation

@ItsDoot
Copy link
Contributor

@ItsDoot ItsDoot commented Jan 1, 2026

Objective

Currently in order to use related! macro you have to additionally import SpawnRelated. We should be able to avoid that.

Solution

Added an as SpawnRelated typecast in the macro expansion.

Testing

Removed the import from the macro's doctest to prove that 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 labels Jan 1, 2026
@alice-i-cecile alice-i-cecile 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 Jan 1, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 1, 2026
@alice-i-cecile alice-i-cecile added this to the 0.18 milestone Jan 1, 2026
Merged via the queue into bevyengine:main with commit e425212 Jan 1, 2026
51 checks passed
@ItsDoot ItsDoot deleted the fix/import branch January 2, 2026 00:04
github-merge-queue bot pushed a commit that referenced this pull request Jan 5, 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.
cart pushed a commit that referenced this pull request Jan 8, 2026
)

# Objective

Currently in order to use `related!` macro you have to additionally
import `SpawnRelated`. We should be able to avoid that.

## Solution

Added an `as SpawnRelated` typecast in the macro expansion.

## Testing

Removed the import from the macro's doctest to prove that it works.
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-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-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.

2 participants