Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove default implementations of methods in WorldQuery. - #25175

#25175
Open
andriyDev wants to merge 2 commits into
bevyengine:mainbevyengine/bevy:mainfrom
andriyDev:system-param-no-defaultandriyDev/bevy:system-param-no-defaultCopy head branch name to clipboard
Open

Remove default implementations of methods in WorldQuery.#25175
andriyDev wants to merge 2 commits into
bevyengine:mainbevyengine/bevy:mainfrom
andriyDev:system-param-no-defaultandriyDev/bevy:system-param-no-defaultCopy head branch name to clipboard

Conversation

@andriyDev

Copy link
Copy Markdown
Contributor

Objective

  • WorldQuery currently has two methods init_nested_access and update_archetypes that are default implemented.
  • These methods have an important role in the safety of implementing WorldQuery. Forgetting to set these can be dangerous.

Solution

  • Don't default initialize these methods!
    • Even if most implementations of these methods do nothing, WorldQuery is highly unsafe to get wrong, so having implementors specifically implement these to be empty is good!

@andriyDev
andriyDev requested review from ItsDoot and chescock July 27, 2026 02:25
@andriyDev andriyDev added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 27, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in ECS Jul 27, 2026
@andriyDev andriyDev added the M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Jul 27, 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-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.