From c4ea4776c419a44bfa49ad3e7f13a675d28d8d1a Mon Sep 17 00:00:00 2001 From: BD103 <59022059+BD103@users.noreply.github.com> Date: Fri, 26 Jul 2024 18:05:36 -0400 Subject: [PATCH] Fix `bevy_winit` not building with `serialize` feature (#14469) # Objective - `bevy_winit` fails to build with just the `serialize` feature. - Caught by [`flag-frenzy`](https://github.com/TheBevyFlock/flag-frenzy) in [this run](https://github.com/TheBevyFlock/flag-frenzy/actions/runs/10087486444/job/27891723948), using the new, nuanced configuration system! ## Solution - It was failing because `bevy_winit` did not pass the `serialize` flag to two of its dependencies: `bevy_input` and `bevy_window`. - To fix this, add these crates to the feature flag. ## Testing ```bash # On Linux, you must also specify a backend: `x11` or `wayland`. # You can do this with `-F serialize,x11`, etc. cargo check -p bevy_winit --no-default-features -F serialize ``` --- crates/bevy_winit/Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index 53795d57fd..d882482678 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -13,7 +13,7 @@ trace = [] wayland = ["winit/wayland", "winit/wayland-csd-adwaita"] x11 = ["winit/x11"] accesskit_unix = ["accesskit_winit/accesskit_unix", "accesskit_winit/async-io"] -serialize = ["serde"] +serialize = ["serde", "bevy_input/serialize", "bevy_window/serialize"] [dependencies] # bevy @@ -52,7 +52,6 @@ wasm-bindgen = { version = "0.2" } web-sys = "0.3" crossbeam-channel = "0.5" - [lints] workspace = true