bevy/crates/bevy_ecs/src
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
..
entity Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
identifier Unified identifer for entities & relations (#9797) 2024-01-13 01:09:32 +00:00
query Replace pointer castings (as) by their API equivalent (#11818) 2024-02-11 23:19:36 +00:00
reflect Move EntityHash related types into bevy_ecs (#11498) 2024-02-12 15:02:24 +00:00
schedule Fix SystemTypeSet::system_type being out of sync with System::type_id (#12030) 2024-02-27 17:17:54 +01:00
storage Double the capacity when BlobVec is full (#11167) 2024-01-22 15:05:34 +00:00
system Fix SystemTypeSet::system_type being out of sync with System::type_id (#12030) 2024-02-27 17:17:54 +01:00
world Use question mark operator when possible (#11865) 2024-02-14 18:44:33 +00:00
archetype.rs Make Archetypes.archetype_component_count private (#10774) 2024-02-03 00:07:50 +00:00
bundle.rs Fix small docs misformat in BundleInfo::new (#11855) 2024-02-13 22:14:05 +00:00
change_detection.rs Mention Resource where missing from component/resource related type docs (#11769) 2024-02-08 06:31:48 +00:00
component.rs Mention Resource where missing from component/resource related type docs (#11769) 2024-02-08 06:31:48 +00:00
event.rs Fix bug where events are not being dropped (#11528) 2024-02-02 21:14:54 +00:00
lib.rs Use TypeIdMap whenever possible (#11684) 2024-02-03 23:47:04 +00:00
removal_detection.rs Docs reflect that RemovalDetection also yields despawned entities (#11795) 2024-02-10 11:18:05 +00:00