bevy/crates/bevy_ecs/compile_fail/tests/ui
Alice Cecile 6ddd0f16a8
Component lifecycle reorganization and documentation (#19543)
# Objective

I set out with one simple goal: clearly document the differences between
each of the component lifecycle events via module docs.

Unfortunately, no such module existed: the various lifecycle code was
scattered to the wind.
Without a unified module, it's very hard to discover the related types,
and there's nowhere good to put my shiny new documentation.

## Solution

1. Unify the assorted types into a single
`bevy_ecs::component_lifecycle` module.
2. Write docs.
3. Write a migration guide.

## Testing

Thanks CI!

## Follow-up

1. The lifecycle event names are pretty confusing, especially
`OnReplace`. We should consider renaming those. No bikeshedding in my PR
though!
2. Observers need real module docs too :(
3. Any additional functional changes should be done elsewhere; this is a
simple docs and re-org PR.

---------

Co-authored-by: theotherphil <phil.j.ellison@gmail.com>
2025-06-10 00:59:16 +00:00
..
component_hook_call_signature_mismatch.rs allow Call and Closure expressions in hook macro attributes (#18017) 2025-03-06 16:39:11 +00:00
component_hook_call_signature_mismatch.stderr allow Call and Closure expressions in hook macro attributes (#18017) 2025-03-06 16:39:11 +00:00
component_hook_relationship.rs Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00
component_hook_relationship.stderr allow Call and Closure expressions in hook macro attributes (#18017) 2025-03-06 16:39:11 +00:00
component_hook_struct_path.rs allow Call and Closure expressions in hook macro attributes (#18017) 2025-03-06 16:39:11 +00:00
component_hook_struct_path.stderr allow Call and Closure expressions in hook macro attributes (#18017) 2025-03-06 16:39:11 +00:00
entity_ref_mut_lifetime_safety.rs
entity_ref_mut_lifetime_safety.stderr
query_exact_sized_iterator_safety.rs
query_exact_sized_iterator_safety.stderr chore: update compile fail test stderr files (#18056) 2025-03-01 00:31:55 +00:00
query_iter_combinations_mut_iterator_safety.rs
query_iter_combinations_mut_iterator_safety.stderr chore: update compile fail test stderr files (#18056) 2025-03-01 00:31:55 +00:00
query_iter_many_mut_iterator_safety.rs
query_iter_many_mut_iterator_safety.stderr chore: update compile fail test stderr files (#18056) 2025-03-01 00:31:55 +00:00
query_lens_lifetime_safety.rs Fix unsound lifetimes in Query::join and Query::join_filtered (#17972) 2025-03-10 21:30:34 +00:00
query_lens_lifetime_safety.stderr Fix unsound lifetimes in Query::join and Query::join_filtered (#17972) 2025-03-10 21:30:34 +00:00
query_lifetime_safety.rs Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
query_lifetime_safety.stderr Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
query_to_readonly.rs Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
query_to_readonly.stderr chore: update compile fail test stderr files (#18056) 2025-03-01 00:31:55 +00:00
query_transmute_safety.rs Make Query::single (and friends) return a Result (#18082) 2025-03-02 19:51:56 +00:00
query_transmute_safety.stderr
system_param_derive_readonly.rs
system_param_derive_readonly.stderr chore: update compile fail test stderr files (#18056) 2025-03-01 00:31:55 +00:00
system_query_get_lifetime_safety.rs
system_query_get_lifetime_safety.stderr
system_query_get_many_lifetime_safety.rs
system_query_get_many_lifetime_safety.stderr
system_query_get_many_mut_lifetime_safety.rs
system_query_get_many_mut_lifetime_safety.stderr
system_query_iter_lifetime_safety.rs
system_query_iter_lifetime_safety.stderr
system_query_iter_many_mut_lifetime_safety.rs
system_query_iter_many_mut_lifetime_safety.stderr
system_query_iter_sort_lifetime_safety.rs Fix unsoundness in QueryIter::sort_by (#17826) 2025-02-26 20:36:37 +00:00
system_query_iter_sort_lifetime_safety.stderr chore: update compile fail test stderr files (#18056) 2025-03-01 00:31:55 +00:00
system_query_set_get_lifetime_safety.rs
system_query_set_get_lifetime_safety.stderr
system_query_set_iter_lifetime_safety.rs
system_query_set_iter_lifetime_safety.stderr
system_state_get_lifetime_safety.rs
system_state_get_lifetime_safety.stderr
system_state_iter_lifetime_safety.rs
system_state_iter_lifetime_safety.stderr
system_state_iter_mut_overlap_safety.rs
system_state_iter_mut_overlap_safety.stderr
world_query_derive.rs
world_query_derive.stderr chore: update compile fail test stderr files (#18056) 2025-03-01 00:31:55 +00:00