Skip to content

Fix the macOS and Windows CI failures on main - #114

Open
huntharo wants to merge 4 commits into
tobi:mainfrom
huntharo:fix/upstream-ci-macos-windows
Open

huntharo wants to merge 4 commits into
tobi:mainfrom
huntharo:fix/upstream-ci-macos-windows

Conversation

@huntharo

@huntharo huntharo commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

main (9b18b27) fails CI on macOS and Windows; Linux passes. Three causes:

Windows clients rejected every SSH path from a Unix host. Unix hosts send roots like /home/someone, and on Windows Path::is_absolute also requires a drive letter, so the picker refused the chosen remote root (remote_root_acceptance_never_stats_the_path_locally). Root discovery and the scan header used the same check and would have rejected every Unix path too. The new remote::is_remote_absolute accepts a path that is absolute on this platform or starts with /, so a Windows host's C:\... roots still pass (serve runs on Windows too). It is not has_root, which on Windows also accepts \x, a path that is absolute nowhere. On Unix it gives the same result as is_absolute. Local roots in the picker still use is_absolute.

The volume picker test compared against the unresolved temp path. Accepting a local root canonicalizes it, and the temp directory is behind /var -> /private/var on macOS and an 8.3 short name on Windows runners. The test now expects the canonical path (enter_in_the_focused_volume_picker_scans_the_selected_root).

Clippy failed on Windows. In remote.rs, RemoteScan::spawn_command and the test helper wait are only called from Unix-only tests, so they were dead code on Windows under -D warnings. They are now gated on unix.

Verified locally on macOS: cargo xtask lint and cargo xtask test both pass, and cargo clippy -p disktree-core --all-targets --target x86_64-pc-windows-msvc -- -D warnings is clean. The app crate can't be cross-checked for Windows from macOS, so CI covers the Windows test runs.

Windows clients rejected every path an SSH host sent. The helper is
Unix-only, so remote roots are /-rooted, but Path::is_absolute also
wants a drive letter on Windows. Root discovery, the scan header and
the picker now check remote paths with is_remote_absolute, which
agrees with is_absolute on Unix.

The volume picker test compared against the unresolved temporary
path. Accepting a local root canonicalizes it, and the temporary
directory is /var -> /private/var on macOS and an 8.3 short name on
Windows runners.

spawn_command and wait in remote.rs are only used by the Unix tests,
so clippy -D warnings failed on Windows. Gate them on unix.
Path::has_root also accepts \x and C:\x on Windows, which name nothing
on the Unix host the helper runs on. Check for a leading / instead.
serve also runs on Windows, and the round-trip tests there send native
C:\ roots. Accept a path that is absolute on this platform or
/-rooted; \x stays rejected.
The preview comes from the Unix helper's streaming walk. On Windows
serve sends a finished tree with no preview, so the test's unwrap
failed there. It was hidden on main because cargo test stops at the
first failing test binary, which was the app's.
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