Skip to content

Conversation

couyit
Copy link
Contributor

@couyit couyit commented Feb 4, 2025

Objective

Fixes #17662

Solution

Moved Item and fetch from WorldQuery to QueryData, and adjusted their implementations accordingly.

Currently, documentation related to fetch is written under WorldQuery. It would be more appropriate to move it to the QueryData documentation for clarity.

I am not very experienced with making contributions. If there are any mistakes or areas for improvement, I would appreciate any suggestions you may have.

Migration Guide

The WorldQuery::Item type and WorldQuery::fetch method have been moved to QueryData, as they were not useful for QueryFilter types.

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

Copy link
Contributor

@Carter0 Carter0 left a comment

Choose a reason for hiding this comment

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

Makes sense. And I think the rust compiler would help guide you through this.

Copy link
Contributor

@chescock chescock left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for fixing this so quickly!

@chescock chescock added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Feb 5, 2025
@alice-i-cecile alice-i-cecile added the M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Feb 5, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

It looks like your PR is a breaking change, but you didn't provide a migration guide.

Could you add some context on what users should update when this change get released in a new version of Bevy?
It will be used to help writing the migration guide for the version. Putting it after a ## Migration Guide will help it get automatically picked up by our tooling.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 5, 2025
@alice-i-cecile
Copy link
Member

I've added a migration guide for you :) Really excellent stuff; thanks for tackling this. I hope it was fun and/or educational :D

Merged via the queue into bevyengine:main with commit 03af547 Feb 5, 2025
32 checks passed
ElliottjPierce added a commit to ElliottjPierce/bevy that referenced this pull request Feb 5, 2025
These were fixes from changes caused by bevyengine#17679
mrchantey pushed a commit to mrchantey/bevy that referenced this pull request Feb 17, 2025
…17679)

# Objective

Fixes bevyengine#17662

## Solution

Moved `Item` and `fetch` from `WorldQuery` to `QueryData`, and adjusted
their implementations accordingly.

Currently, documentation related to `fetch` is written under
`WorldQuery`. It would be more appropriate to move it to the `QueryData`
documentation for clarity.

I am not very experienced with making contributions. If there are any
mistakes or areas for improvement, I would appreciate any suggestions
you may have.

## Migration Guide

The `WorldQuery::Item` type and `WorldQuery::fetch` method have been
moved to `QueryData`, as they were not useful for `QueryFilter` types.

---------

Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
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 M-Needs-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

None yet

Development

Successfully merging this pull request may close these issues.

Item and fetch should be moved to QueryData from WorldQuery

4 participants