-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - [Fixes #6059] Entity
's “ID” should be named “index” instead
#6107
Conversation
Could someone help me apply the label specified in #6059? It was the |
id
in the Entity
struct to index
Entity
's “ID” should be named “index” instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is few places where "id" should be change into "index".
Done. (my bad, I forgot that only organization members can tag issues and PRs) |
My plan was to do the changes incrementally. So I started off by just changing the
Thank you! :) |
Could I get some help with |
bors try |
tryBuild failed: |
Looks like there's some code that is only compiled in wasm builds. It wasn't changed probably because rust-analyzer checks for the default target. If you do |
Thank you! I believe that the issue should be resolved now. 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few variables named idx
in sparse_set.rs
need to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few variables named
idx
insparse_set.rs
need to be updated.
okay, I agree with these changes. I will get right on it. 😄
…bevy_entity_id_to_index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of this change, and this is well-done. Can you please resolve the comments as you address them to make it easier for reviewers to track what needs to be done?
Great, thank you! I think all comments should be resolved now. |
// Fetch the entity with the given entity index from the `entity_map` | ||
// or spawn a new entity with a transiently unique index if there is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id
is correct here.
for component_index in self.world.entity(entity).archetype().components() { | ||
let reflect_component = self | ||
.world | ||
.components() | ||
.get_info(component_id) | ||
.get_info(component_index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
component_id
is correct here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, my bad! Will fix this right away.
…ne_builder.rs``
…bevy_entity_id_to_index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase LGTM.
Looks like there are some new calls to |
Attempting to fix it right now. |
Can you please add the following to your PR description? Migration GuideThe bors r+ |
# Objective Fixes #6059, changing all incorrect occurrences of ``id`` in the ``entity`` module to ``index``: * struct level documentation, * ``id`` struct field, * ``id`` method and its documentation. ## Solution Renaming and verifying using CI. Co-authored-by: Edvin Kjell <43633999+Edwox@users.noreply.github.com>
The description should be updated now. |
Pull request successfully merged into main. Build succeeded:
|
Entity
's “ID” should be named “index” insteadEntity
's “ID” should be named “index” instead
Continuation of bevyengine#6107 Co-authored-by: devil-ira <justthecooldude@gmail.com>
Continuation of bevyengine#6107 Co-authored-by: devil-ira <justthecooldude@gmail.com>
…tead (bevyengine#6107) # Objective Fixes bevyengine#6059, changing all incorrect occurrences of ``id`` in the ``entity`` module to ``index``: * struct level documentation, * ``id`` struct field, * ``id`` method and its documentation. ## Solution Renaming and verifying using CI. Co-authored-by: Edvin Kjell <43633999+Edwox@users.noreply.github.com>
Continuation of bevyengine#6107 Co-authored-by: devil-ira <justthecooldude@gmail.com>
Objective
Fixes #6059, changing all incorrect occurrences of
id
in theentity
module toindex
:id
struct field,id
method and its documentation.Solution
Renaming and verifying using CI.
Migration Guide
The
Entity::id()
method was renamed toEntity::index()
.