Skip to content

fix: gate unix-only MetadataExt behind cfg(unix) for Windows build#321

Merged
avihut merged 1 commit intomasterfrom
daft-321/fix-windows-build
Mar 24, 2026
Merged

fix: gate unix-only MetadataExt behind cfg(unix) for Windows build#321
avihut merged 1 commit intomasterfrom
daft-321/fix-windows-build

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Mar 24, 2026

Summary

  • The compute_directory_size function used std::os::unix::fs::MetadataExt (nlink, dev, ino) unconditionally, which fails to compile on Windows
  • Gate the hard-link deduplication behind #[cfg(unix)] and provide a simpler fallback for non-unix platforms that just sums file sizes
  • Fixes the v1.3.0 release build failure on x86_64-pc-windows-msvc

Test plan

  • cargo check passes locally
  • mise run clippy passes with zero warnings
  • mise run fmt shows no changes
  • Unit tests pass (7 pre-existing failures unrelated to this change)
  • CI passes on all platforms including Windows

🤖 Generated with Claude Code

The compute_directory_size function used std::os::unix::fs::MetadataExt
(nlink, dev, ino) unconditionally, which fails to compile on Windows.
Gate the hard-link deduplication behind #[cfg(unix)] and provide a
simpler fallback for non-unix platforms that just sums file sizes.

Fixes the v1.3.0 release build failure on x86_64-pc-windows-msvc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avihut avihut added this to the Public Launch milestone Mar 24, 2026
@avihut avihut added the fix Bug fix label Mar 24, 2026
@avihut avihut self-assigned this Mar 24, 2026
@avihut avihut merged commit b1b5c4e into master Mar 24, 2026
8 checks passed
@avihut avihut deleted the daft-321/fix-windows-build branch March 24, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant