bevy/crates
Luca Della Vedova 6d3b2faf8a
Fix commands not being Send / Sync in 0.14 (#14392)
# Objective

Fixes Commands not being `Send` or `Sync` anymore in 0.14 by
implementing `Send` and `Sync` for `RawCommandQueue`.

## Solution

Reference discussion in
[discord](https://discord.com/channels/691052431525675048/691052431974465548/1259464518539411570).
It seems that in https://github.com/bevyengine/bevy/pull/13249, when
adding a `RawCommandQueue` variant to the `InternalQueue`, the `Send /
Sync` traits were not implemented for it, which bubbled up all the way
to `Commands` not being `Send / Sync` anymore.
I am not very familiar with the ECS internals so I can't say whether the
`RawCommandQueue` is safe to be shared between threads, but I know for
sure that before the linked PR `Commands` were indeed `Send` and `Sync`
so that PR broke "some workflows" (mandatory
[xkcd](https://xkcd.com/1172/)).

## Testing

This PR itself includes a compile test to make sure `Commands` will
implement `Send` and `Sync`. The test itself fails without the
implementation and succeeds with it.
Furthermore, if I cherry pick the test to a previous release (i.e. 0.13)
it indeed succeeds, showing that this is a regression specific to 0.14.

---------

Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
2024-08-19 21:29:30 +00:00
..
bevy_a11y Add Reflect derive to bevy_a11y::Focus (#14763) 2024-08-15 17:33:20 +00:00
bevy_animation apply finished animations (#14743) 2024-08-15 15:10:23 +00:00
bevy_app bevy_reflect: Store functions as DynamicClosure<'static> in FunctionRegistry (#14704) 2024-08-17 00:20:47 +00:00
bevy_asset reflect: implement the unique reflect rfc (#7207) 2024-08-12 17:01:41 +00:00
bevy_audio Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_color Update WGPU to version 22 (#14401) 2024-08-12 16:55:18 +00:00
bevy_core Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_core_pipeline Ignore PipelineCache ambiguities (#14772) 2024-08-16 23:43:40 +00:00
bevy_derive Remove deprecated bevy_dynamic_plugin (#14534) 2024-07-30 15:31:08 +00:00
bevy_dev_tools Enables bevy_render feature for bevy_gizmos dependency in bevy_dev_tools (#14765) 2024-08-15 21:53:55 +00:00
bevy_diagnostic Add freebsd support for sysinfo (#14553) 2024-07-31 21:41:40 +00:00
bevy_dylib Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ecs Fix commands not being Send / Sync in 0.14 (#14392) 2024-08-19 21:29:30 +00:00
bevy_encase_derive Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_gilrs Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_gizmos Switch rotation & translation in grid gizmos (#14656) 2024-08-16 23:40:06 +00:00
bevy_gltf Changed Mesh::attributes* functions to return MeshVertexAttribute (#14394) 2024-08-12 15:54:28 +00:00
bevy_hierarchy Add link to with_children in with_child doc (#14604) 2024-08-04 13:36:52 +00:00
bevy_input Fix common capitalization errors in documentation (#14562) 2024-07-31 21:16:05 +00:00
bevy_internal hooking up observers and clicking for ui node (#14695) 2024-08-15 14:43:55 +00:00
bevy_log Fix common capitalization errors in documentation (#14562) 2024-07-31 21:16:05 +00:00
bevy_macro_utils Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_math add consts to curve module functions (#14785) 2024-08-16 19:28:29 +00:00
bevy_mikktspace Glam 0.28 update - adopted (#14613) 2024-08-06 01:28:00 +00:00
bevy_pbr Changed Mesh::attributes* functions to return MeshVertexAttribute (#14394) 2024-08-12 15:54:28 +00:00
bevy_picking hooking up observers and clicking for ui node (#14695) 2024-08-15 14:43:55 +00:00
bevy_ptr Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_reflect bevy_reflect: Store functions as DynamicClosure<'static> in FunctionRegistry (#14704) 2024-08-17 00:20:47 +00:00
bevy_render Fix size of MeshVertexAttributeId to be platform independent (#6624) 2024-08-19 21:09:20 +00:00
bevy_scene reflect: implement the unique reflect rfc (#7207) 2024-08-12 17:01:41 +00:00
bevy_sprite Add AlphaMask2d phase (#14724) 2024-08-15 14:10:37 +00:00
bevy_state Use #[doc(fake_variadic)] to improve docs readability (#14703) 2024-08-12 18:54:33 +00:00
bevy_tasks Fix common capitalization errors in documentation (#14562) 2024-07-31 21:16:05 +00:00
bevy_text Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_time time_system is ambiguous_with event_update_system (#14544) 2024-07-31 12:13:17 +00:00
bevy_transform Generate links to definition in source code pages on docs.rs and dev-docs.bevyengine.org (#12965) 2024-07-29 23:10:16 +00:00
bevy_ui #14143 - fix bevy_ui padding (#14777) 2024-08-16 21:22:44 +00:00
bevy_utils Use #[doc(fake_variadic)] to improve docs readability (#14703) 2024-08-12 18:54:33 +00:00
bevy_window Add custom cursors (#14284) 2024-08-12 15:49:03 +00:00
bevy_winit Add custom cursors (#14284) 2024-08-12 15:49:03 +00:00