Skip to content

fix: Windows CI test failure and compilation warnings#41

Merged
guoyongchang merged 2 commits into
mainfrom
ui-optimize-3
Jun 12, 2026
Merged

fix: Windows CI test failure and compilation warnings#41
guoyongchang merged 2 commits into
mainfrom
ui-optimize-3

Conversation

@guoyongchang

Copy link
Copy Markdown
Owner

Summary

  • Windows CI: switch to --no-run (compile-only) — portable-pty/Tauri native deps lack ConPTY DLLs on GitHub Actions runners (STATUS_ENTRYPOINT_NOT_FOUND). macOS keeps full test execution.
  • Fix 9 Windows compilation warnings: unused imports (Duration/Instant behind cfg gate), windows_sys RestartManager constants in match patterns, dead test helper code.

Test plan

  • cargo clippy --lib -- -D warnings zero warnings
  • cargo test --lib -- --test-threads=1 443 passed
  • CI passes on all three platforms (Ubuntu test, macOS test, Windows compile-only)

Note

Previous PR #39 was squash-merged with a stale destructive commit from pre-push hook state corruption — reverted in #40. This PR is a clean replacement.

- Windows CI: use --no-run (compile-only) since portable-pty/Tauri
  native deps lack ConPTY DLLs on GitHub Actions runners
  (STATUS_ENTRYPOINT_NOT_FOUND). macOS keeps full test execution.
- pty.rs: gate Duration/Instant imports with cfg(not(windows))
- worktree.rs: replace match-on-constants with if-chain for
  RestartManager app type (windows_sys constants aren't pattern-safe)
- system.rs: suppress dead_code on test helper `remove()`, gate
  `shell_quote` with cfg(unix)
… processes

u32::MAX (4294967295) overflows to -1 in i32, and `kill -TERM -1` on Linux
sends SIGTERM to every process the caller can signal — including the CI runner.

Fix: use PID 4000000 (high but valid) in test, and add i32::MAX guard in
terminate_process_impl to reject PIDs that would overflow to negative values.
@guoyongchang guoyongchang merged commit 29b9ddc into main Jun 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant