bevy/crates
Jakob Hellermann 4b7f904cfc remove Serialize impl for dyn Array and friends (#4780)
# Objective

`bevy_reflect` as different kinds of reflected types (each with their own trait), `trait Struct: Reflect`, `trait List: Reflect`, `trait Map: Reflect`, ...
Types that don't fit either of those are called reflect value types, they are opaque and can't be deconstructed further.

`bevy_reflect` can serialize `dyn Reflect` values. Any container types (struct, list, map) get deconstructed and their elements serialized separately, which can all happen without serde being involved ever (happens [here](https://github.com/bevyengine/bevy/blob/main/crates/bevy_reflect/src/serde/ser.rs#L50-L85=)).
 The only point at which we require types to be serde-serializable is for *value types* (happens [here](https://github.com/bevyengine/bevy/blob/main/crates/bevy_reflect/src/serde/ser.rs#L104=)).

So reflect array serializing is solved, since arrays are container types which don't require serde.

#1213 also introduced added the `serialize` method and `Serialize` impls for `dyn Array` and `DynamicArray` which use their element's `Reflect::serializable` function. This is 1. unnecessary, because it is not used for array serialization, and 2. annoying for removing the `Serialize` bound on container types, because these impls don't have access to the `TypeRegistry`, so we can't move the serialization code there.

# Solution

Remove these impls and `fn serialize`. It's not used and annoying for other changes.
2022-05-30 20:22:57 +00:00
..
bevy_animation Split time functionality into bevy_time (#4187) 2022-05-26 00:27:18 +00:00
bevy_app Copy TaskPool resoures to subapps (#4792) 2022-05-30 16:59:43 +00:00
bevy_asset Enforce type safe usage of Handle::get (#4794) 2022-05-30 16:59:44 +00:00
bevy_audio Add missing audio/ogg file extensions: .oga, .spx (#4703) 2022-05-09 13:37:40 +00:00
bevy_core Split time functionality into bevy_time (#4187) 2022-05-26 00:27:18 +00:00
bevy_core_pipeline ExtractResourcePlugin (#3745) 2022-05-30 18:36:03 +00:00
bevy_derive Decouple some dependencies (#3886) 2022-04-27 19:08:11 +00:00
bevy_diagnostic Split time functionality into bevy_time (#4187) 2022-05-26 00:27:18 +00:00
bevy_dylib Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_dynamic_plugin Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_ecs Allow higher order systems (#4833) 2022-05-30 17:59:20 +00:00
bevy_ecs_compile_fail_tests Make derived SystemParam readonly if possible (#4650) 2022-05-09 16:09:33 +00:00
bevy_encase_derive Migrate to encase from crevice (#4339) 2022-05-18 21:09:21 +00:00
bevy_gilrs Update gilrs to v0.9 (#4848) 2022-05-30 17:26:23 +00:00
bevy_gltf Fixing confusing near and far fields in Camera (#4457) 2022-05-16 16:37:33 +00:00
bevy_hierarchy Support returning data out of with_children (#4708) 2022-05-17 22:37:51 +00:00
bevy_input Update keyboard.rs docs in bevy_input (#4517) 2022-05-17 04:16:54 +00:00
bevy_internal Split time functionality into bevy_time (#4187) 2022-05-26 00:27:18 +00:00
bevy_log Update tracing-tracy requirement from 0.8.0 to 0.9.0 (#4786) 2022-05-27 11:54:57 +00:00
bevy_macro_utils bevy_reflect_derive: Tidying up the code (#4712) 2022-05-12 19:43:23 +00:00
bevy_math Document bevy_math (#4591) 2022-04-26 18:23:29 +00:00
bevy_pbr ExtractResourcePlugin (#3745) 2022-05-30 18:36:03 +00:00
bevy_ptr bevy_ptr works in no_std environments (#4760) 2022-05-16 17:45:10 +00:00
bevy_reflect remove Serialize impl for dyn Array and friends (#4780) 2022-05-30 20:22:57 +00:00
bevy_render ExtractResourcePlugin (#3745) 2022-05-30 18:36:03 +00:00
bevy_scene Update gilrs to v0.9 (#4848) 2022-05-30 17:26:23 +00:00
bevy_sprite Added offset parameter to TextureAtlas::from_grid_with_padding (#4836) 2022-05-30 19:58:16 +00:00
bevy_tasks Remove unused CountdownEvent (#4290) 2022-04-26 21:20:12 +00:00
bevy_text Enforce type safe usage of Handle::get (#4794) 2022-05-30 16:59:44 +00:00
bevy_time Split time functionality into bevy_time (#4187) 2022-05-26 00:27:18 +00:00
bevy_transform Nightly clippy fixes (#3491) 2022-05-17 04:38:03 +00:00
bevy_ui Enforce type safe usage of Handle::get (#4794) 2022-05-30 16:59:44 +00:00
bevy_utils Update gilrs to v0.9 (#4848) 2022-05-30 17:26:23 +00:00
bevy_window Update gilrs to v0.9 (#4848) 2022-05-30 17:26:23 +00:00
bevy_winit Optionally resize Window canvas element to fit parent element (#4726) 2022-05-20 23:13:48 +00:00