Skip to content

Make ComponentIds more available near ComponentInfos - #25780

Merged
alice-i-cecile merged 4 commits into
bevyengine:mainfrom
ItsDoot:ecs/components-iter-ids
Sep 16, 2026
Merged

alice-i-cecile merged 4 commits into
bevyengine:mainfrom
ItsDoot:ecs/components-iter-ids

Conversation

@ItsDoot

@ItsDoot ItsDoot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Objective

Missed a small bit in #25774.

Solution

Return ComponentIds alongside the ComponentInfos in Components::iter_registered()

@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 Sep 14, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in ECS Sep 14, 2026
@ItsDoot ItsDoot added this to the 0.20 milestone Sep 14, 2026

@Trashtalk217 Trashtalk217 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that World::iter_resources and World::iter_resources_mut should also return a ComponentId, so if you can, can you change those to return (ComponentId, &ComponentInfo, ...) instead of (&ComponentInfo, ...)?

@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 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 S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 14, 2026
@ItsDoot ItsDoot 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 Sep 15, 2026
@ItsDoot

ItsDoot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

All remaining usages of ComponentInfo should have a ComponentId nearby now.

@ItsDoot ItsDoot 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 Sep 15, 2026
@ItsDoot ItsDoot changed the title Return ComponentIds from Components::iter_registered() Make ComponentIds more available near ComponentInfos Sep 15, 2026
@ItsDoot ItsDoot added M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide 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 Sep 15, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 16, 2026
Merged via the queue into bevyengine:main with commit b40f2d1 Sep 16, 2026
41 of 42 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in ECS Sep 16, 2026
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 M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants