Skip to content

Conversation

Trashtalk217
Copy link
Contributor

Objective

Both iter_entities() and iter_entities_mut are awkward functions as they both return all entities, which is something you (should) rarely want.

Solution

Deprecate both functions and substitute them where they are used.

Testing

Not necessary.

@Trashtalk217 Trashtalk217 added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 23, 2025
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Trashtalk217 and others added 2 commits July 23, 2025 18:43
Co-authored-by: Carter Weinberg <weinbergcarter@gmail.com>
Co-authored-by: Carter Weinberg <weinbergcarter@gmail.com>
@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-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 23, 2025
@alice-i-cecile
Copy link
Member

Waiting on a quick test to ensure the workaround in the migration guide keeps working, then I'll be comfortable merging this.

@alice-i-cecile alice-i-cecile enabled auto-merge July 23, 2025 19:26
@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-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jul 23, 2025
@alice-i-cecile alice-i-cecile disabled auto-merge July 23, 2025 19:29
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jul 23, 2025
Merged via the queue into bevyengine:main with commit 4b1b70d Jul 23, 2025
32 checks passed
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-Code-Quality A section of code that is hard to understand or change D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes 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