WIP: Windows support — compile, tests, and Windows releases#52
Draft
srnnkls wants to merge 3 commits into
Draft
Conversation
phora used Unix-only APIs unconditionally, so it could not build on Windows (which the release pipeline ships a binary for). Fixes: - deploy.rs: cfg-gate the revalidate_file TOCTOU identity check — Windows uses file_index/volume_serial_number (falls back to the content-hash safety net when identity is unconfirmable). - deploy.rs: route copy_tree symlink recreation through the existing cfg-gated create_symlink (symlink_file/symlink_dir on Windows). - cfg(unix)-gate genuinely Unix-specific tests (symlink/permission semantics). - ci.yml: cargo unit on ubuntu/macos/windows, scrut integration on ubuntu/macos. Locking already uses the portable std::fs::File::try_lock; unchanged.
file_index/volume_serial_number are nightly-only (windows_by_handle), so the Windows same_file_identity arm now returns true (the content-hash check is the safety net; the inode/dev TOCTOU fast-path stays Unix-only). Gate the cfg(unix)-test-only imports in sync/mod.rs so -D warnings stays clean on Windows.
After gating Unix-only tests, their exclusive helper fns/consts became dead code on Windows (denied by -D warnings). Gate the closure: 6 symlink test helpers in sync/tests.rs and CONFINE_SYMLINK_ANCESTOR in tests/transitive_confine.rs.
srnnkls
marked this pull request as draft
June 30, 2026 12:35
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.
Draft / tracking PR for full Windows support. Do not merge until green. The release pipeline (#50) ships Linux+macOS first; this PR adds Windows back once phora actually works there.
Done (verified)
revalidate_fileTOCTOU identity check (Windows has no stableMetadatafile identity —file_index/volume_serial_numberare nightly-only — so it returnstrueand relies on the content-hash safety net); routedcopy_treesymlink recreation through the cfg-gatedcreate_symlink.cfg(unix)-gated genuinely Unix-only tests + their exclusive helpers/imports (flushed the full dead-code cascade via a local--cfg phora_win_simsimulation).clippy --all-targetsclean on Windows; macOS + Linux fully green (unit + scrut).Remaining
C:\Users\...) into TOML strings, where\U/\Tare escape sequences →TOML parse error: too few unicode value digits. Fix the helpers to emit TOML-safe paths (forward slashes, TOML literal'...'strings, or proper serialization). This alone greens a large majority./abs/local/repoinsync/transitive.rs:907) that aren't absolute on Windows.x86_64-pc-windows-msvctarget +powershellinstaller indist-workspace.toml;windows-latestin theci.ymlunit lane. Rebase on merged feat: release pipeline (release-plz + cargo-dist) #50 first.Current run: 1119 passed, 176 failed on Windows (all the above).