fix(ci): build daemon_lifecycle on Windows (MSVC) - #3
Merged
Conversation
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.
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.
hmziqrs
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
windows (MSVC test)job has been failing oncargo testwith a compile error:std::os::unixdoes not exist on Windows, so the test crate failed to compile under MSVC.Root cause
silent_client_does_not_wedge_the_accept_loopreached past the crate's cross-platform IPC abstraction and calledstd::os::unix::net::UnixStreamdirectly. Thewindows-gnucross-check never caught it because it rancargo checkwithout--all-targets, so the integration tests were never type-checked for Windows — the breakage only surfaced on the slower MSVC job.Fix
tests/daemon_lifecycle.rs— use the crate's ownoxiwake::platform::connect(Unix socket on Linux, named pipe on Windows). Fixes the build and now exercises the silent-client drop-timeout invariant on Windows too..github/workflows/ci.yml— add--all-targetsto thewindows-gnucross-check so non-Windows calls in tests are caught on the cheap Linux runner before reaching MSVC.Verification
cargo check --target x86_64-pc-windows-gnu --all-targets→ green (this command reproduced the E0433 before the fix)cargo test --test daemon_lifecycle(Linux) → 4/4 pass, incl. the rewritten silent-client testcargo fmt --check/cargo clippy --all-targets -- -D warnings→ clean