From bb3d4361eee47874fc1b0310fb1c8b887561c94f Mon Sep 17 00:00:00 2001 From: hmziqagent Date: Wed, 29 Jul 2026 18:52:13 +0200 Subject: [PATCH 1/2] fix(test): build daemon_lifecycle on Windows (MSVC) The silent-client test called `std::os::unix::net::UnixStream::connect` directly. `std::os::unix` does not exist on Windows, so `cargo test` failed to compile the test crate under MSVC: error[E0433]: cannot find `unix` in `os` --> tests\daemon_lifecycle.rs:349:28 349 | std::os::unix::net::UnixStream::connect(&paths.socket) Use the crate's own cross-platform `oxiwake::platform::connect` instead (Unix socket on Linux, named pipe on Windows). This both fixes the build and exercises the silent-client drop-timeout invariant on Windows too. Why this slipped through: the windows-gnu cross-check ran `cargo check` without `--all-targets`, so it never compiled the integration tests and let the unix-only call reach only the slower MSVC job. --- tests/daemon_lifecycle.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/daemon_lifecycle.rs b/tests/daemon_lifecycle.rs index b7219df..f9bac1e 100644 --- a/tests/daemon_lifecycle.rs +++ b/tests/daemon_lifecycle.rs @@ -344,9 +344,14 @@ fn silent_client_does_not_wedge_the_accept_loop() { }) .expect("daemon never answered initial Ping"); - // A silent client: connect and send nothing, keep the handle alive. + // A silent client: connect and send nothing, keep the handle alive. We use + // the crate's own [`oxiwake::platform::connect`] rather than reaching for + // `std::os::unix::net::UnixStream` directly: `std::os::unix` does not exist + // on Windows, so the direct call broke the MSVC build. `platform::connect` + // is the cross-platform client connect (Unix socket on Linux, named pipe on + // Windows), so this invariant is now exercised on both platforms. let paths = Paths::resolve().unwrap(); - let _silent = std::os::unix::net::UnixStream::connect(&paths.socket).unwrap(); + let _silent = oxiwake::platform::connect(&paths).unwrap(); std::thread::sleep(Duration::from_millis(200)); // A real Ping must still succeed — the silent client is dropped after the From 7c14322715cb470c6648b5a0073c72a7134823a6 Mon Sep 17 00:00:00 2001 From: hmziqagent Date: Wed, 29 Jul 2026 18:52:18 +0200 Subject: [PATCH 2/2] ci: type-check all targets in the windows-gnu cross-check Add `--all-targets` so the integration tests are type-checked for Windows on the cheap Linux runner. A non-Windows call in a test (like the `std::os::unix` usage that just broke the MSVC job) is then caught here instead of only failing the slower windows-msvc job. `cargo check` still does not link, so no MinGW linker is required. --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cc16c3..0f07ea4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,9 +56,12 @@ jobs: targets: x86_64-pc-windows-gnu - uses: Swatinem/rust-cache@v2 # `check` type-checks the cfg(windows) backend without needing a MinGW - # linker to actually link a binary. - - name: cargo check --target x86_64-pc-windows-gnu - run: cargo check --target x86_64-pc-windows-gnu + # linker to actually link a binary. `--all-targets` also type-checks the + # integration tests, so a `std::os::unix` (or other non-Windows) call in a + # test is caught here on the cheap Linux runner instead of failing the + # slower windows-msvc job. + - name: cargo check --target x86_64-pc-windows-gnu --all-targets + run: cargo check --target x86_64-pc-windows-gnu --all-targets windows: name: windows (MSVC test)