bevy/crates/bevy_ecs/src/system
Jakob Hellermann 4022385f51 Fix SystemTypeSet::system_type being out of sync with System::type_id (#12030)
## Objective

Always have `some_system.into_system().type_id() ==
some_system.into_system_set().system_type().unwrap()`.

System sets have a `fn system_type() -> Option<TypeId>` that is
implemented by `SystemTypeSet` to returning the TypeId of the system's
function type. This was implemented in
https://github.com/bevyengine/bevy/pull/7715 and is used in
`bevy_mod_debugdump` to handle `.after(function)` constraints.

Back then, `System::type_id` always also returned the type id of the
function item, not of `FunctionSystem<M, F>`.

https://github.com/bevyengine/bevy/pull/11728 changes the behaviour of
`System::type_id` so that it returns the id of the
`FunctionSystem`/`ExclusiveFunctionSystem` wrapper, but it did not
change `SystemTypeSet::system_type`, so doing the lookup breaks in
`bevy_mod_debugdump`.

## Solution

Change `IntoSystemSet` for functions to return a
`SystemTypeSet<FunctionSystem>` /
`SystemTypeSet<ExclusiveFunctionSystem>` instead of `SystemTypeSet<F>`.
2024-02-27 17:17:54 +01:00
..
commands Fix double indirection when applying command queues (#11822) 2024-02-12 15:27:18 +00:00
adapter_system.rs System::type_id Consistency (#11728) 2024-02-06 14:43:33 +00:00
combinator.rs System::type_id Consistency (#11728) 2024-02-06 14:43:33 +00:00
exclusive_function_system.rs Fix SystemTypeSet::system_type being out of sync with System::type_id (#12030) 2024-02-27 17:17:54 +01:00
exclusive_system_param.rs impl ExclusiveSystemParam for PhantomData (#11153) 2024-01-01 16:02:21 +00:00
function_system.rs Fix SystemTypeSet::system_type being out of sync with System::type_id (#12030) 2024-02-27 17:17:54 +01:00
mod.rs System::type_id Consistency (#11728) 2024-02-06 14:43:33 +00:00
query.rs Deprecated Various Component Methods from Query and QueryState (#9920) 2024-02-04 01:01:59 +00:00
system_name.rs impl ExclusiveSystemParam for SystemName (#11163) 2024-01-01 17:08:29 +00:00
system_param.rs refactor: Simplify lifetimes for Commands and related types (#11445) 2024-01-22 15:35:42 +00:00
system_registry.rs Exclusive systems can now be used for one-shot systems (#11560) 2024-01-27 16:10:39 +00:00
system.rs System::type_id Consistency (#11728) 2024-02-06 14:43:33 +00:00