From 497948eeff5ace3ea366e7d9f9406dc549488651 Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Wed, 25 Nov 2026 18:50:59 +0800 Subject: [PATCH] fix(flutter): compile the Flutter tests on Windows (#5880) The process tests that use FlutterDaemon::with_executable and ToolServer::is_stopped only run on Unix, so on Windows both helpers were dead code and the ide-flutter test build failed under -D warnings. They are now compiled only for Unix tests. --- crates/ide-flutter/src/lib.rs | 2 +- crates/ide-flutter/src/server.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ide-flutter/src/lib.rs b/crates/ide-flutter/src/lib.rs index b3cd4a20a..3af9640b2 100644 --- a/crates/ide-flutter/src/lib.rs +++ b/crates/ide-flutter/src/lib.rs @@ -213,7 +213,7 @@ impl FlutterDaemon { Self(Arc::new(Shared { root, sink, executable, state: Mutex::default() })) } - #[cfg(test)] + #[cfg(all(test, unix))] fn with_executable(root: PathBuf, sink: SharedSink, executable: Option) -> Self { Self::new(root, sink, Box::new(move || executable.clone())) } diff --git a/crates/ide-flutter/src/server.rs b/crates/ide-flutter/src/server.rs index 19e8c2fe1..1c6b2be59 100644 --- a/crates/ide-flutter/src/server.rs +++ b/crates/ide-flutter/src/server.rs @@ -146,7 +146,7 @@ impl ToolServer { self.0.changed.notify_all(); } - #[cfg(test)] + #[cfg(all(test, unix))] pub(crate) fn is_stopped(&self) -> bool { matches!(self.0.state.lock().status, Status::Stopped) }