Skip to content

Conversation

@JaySpruce
Copy link
Member

Fixes a small mix-up from #18058, which added bulk relationship replacement methods.

EntityCommands::replace_related_with_difference calls EntityWorldMut::replace_children_with_difference instead of EntityWorldMut::replace_related_with_difference, which means it always operates on the ChildOf relationship instead of the R: Relationship generic it's provided.

EntityCommands::replace_children_with_difference takes an R: Relationship generic that it shouldn't, but it accidentally works correctly on main because it calls the above method.

@JaySpruce JaySpruce added C-Bug An unexpected or incorrect behavior A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 12, 2025
@JaySpruce JaySpruce added this to the 0.16 milestone Apr 12, 2025
@cart cart added this pull request to the merge queue Apr 14, 2025
Merged via the queue into bevyengine:main with commit e3384bb Apr 14, 2025
39 checks passed
mockersf pushed a commit that referenced this pull request Apr 14, 2025
Fixes a small mix-up from #18058, which added bulk relationship
replacement methods.

`EntityCommands::replace_related_with_difference` calls
`EntityWorldMut::replace_children_with_difference` instead of
`EntityWorldMut::replace_related_with_difference`, which means it always
operates on the `ChildOf` relationship instead of the `R: Relationship`
generic it's provided.

`EntityCommands::replace_children_with_difference` takes an `R:
Relationship` generic that it shouldn't, but it accidentally works
correctly on `main` because it calls the above method.
@JaySpruce JaySpruce deleted the fix_relation_command branch April 14, 2025 21:02
jf908 pushed a commit to jf908/bevy that referenced this pull request May 12, 2025
…#18824)

Fixes a small mix-up from bevyengine#18058, which added bulk relationship
replacement methods.

`EntityCommands::replace_related_with_difference` calls
`EntityWorldMut::replace_children_with_difference` instead of
`EntityWorldMut::replace_related_with_difference`, which means it always
operates on the `ChildOf` relationship instead of the `R: Relationship`
generic it's provided.

`EntityCommands::replace_children_with_difference` takes an `R:
Relationship` generic that it shouldn't, but it accidentally works
correctly on `main` because it calls the above method.
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 S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants