bevy/crates
Zachary Harrold 1974723a63
Deprecated Various Component Methods from Query and QueryState (#9920)
# Objective

- (Partially) Fixes #9904
- Acts on #9910

## Solution

- Deprecated the relevant methods from `Query`, cascading changes as
required across Bevy.

---

## Changelog

- Deprecated `QueryState::get_component_unchecked_mut` method
- Deprecated `Query::get_component` method
- Deprecated `Query::get_component_mut` method
- Deprecated `Query::component` method
- Deprecated `Query::component_mut` method
- Deprecated `Query::get_component_unchecked_mut` method

## Migration Guide

### `QueryState::get_component_unchecked_mut`

Use `QueryState::get_unchecked_manual` and select for the exact
component based on the structure of the exact query as required.

### `Query::(get_)component(_unchecked)(_mut)`

Use `Query::get` and select for the exact component based on the
structure of the exact query as required.

- For mutable access (`_mut`), use `Query::get_mut`
- For unchecked access (`_unchecked`), use `Query::get_unchecked`
- For panic variants (non-`get_`), add `.unwrap()`

## Notes

- `QueryComponentError` can be removed once these deprecated methods are
also removed. Due to an interaction with `thiserror`'s derive macro, it
is not marked as deprecated.
2024-02-04 01:01:59 +00:00
..
bevy_a11y Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_animation Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_app Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
bevy_asset Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
bevy_audio Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_core Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_core_pipeline Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_derive Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_diagnostic Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_dylib Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_dynamic_plugin Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_ecs Deprecated Various Component Methods from Query and QueryState (#9920) 2024-02-04 01:01:59 +00:00
bevy_ecs_compile_fail_tests Deprecated Various Component Methods from Query and QueryState (#9920) 2024-02-04 01:01:59 +00:00
bevy_encase_derive Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_gilrs Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_gizmos Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
bevy_gltf Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_hierarchy Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_input Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_internal Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_log Update tracing-tracy requirement from 0.10.4 to 0.11.0 and tracy-client requirement from 0.16.4 to 0.17.0 (#11678) 2024-02-03 21:44:38 +00:00
bevy_macro_utils Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_mikktspace Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_pbr Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_ptr Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_reflect Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
bevy_reflect_compile_fail_tests bevy_reflect: Type parameter bounds (#9046) 2024-01-28 16:24:03 +00:00
bevy_render Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
bevy_scene Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
bevy_sprite Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_tasks Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_text Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_time Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_transform Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_ui Deprecated Various Component Methods from Query and QueryState (#9920) 2024-02-04 01:01:59 +00:00
bevy_utils Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
bevy_window Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
bevy_winit Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00