Skip to content

Add tryCloneTree stub for non-darwin/linux platforms#23

Merged
bkildow merged 1 commit into
mainfrom
fix/windows-clone-tree-stub
Apr 27, 2026
Merged

Add tryCloneTree stub for non-darwin/linux platforms#23
bkildow merged 1 commit into
mainfrom
fix/windows-clone-tree-stub

Conversation

@bkildow
Copy link
Copy Markdown
Owner

@bkildow bkildow commented Apr 27, 2026

Summary

  • Fix Windows release build broken by Reflink shared/copy subtrees in a single syscall #22, which introduced tryCloneTree only in reflink_darwin.go and reflink_linux.go. The !darwin && !linux build (used by goreleaser for Windows) failed with undefined: tryCloneTree at internal/project/fscopy/fscopy.go:81, causing the v0.6.0 release workflow to fail.
  • Add a tryCloneTree stub to reflink_other.go returning errReflinkUnsupported, mirroring the existing tryReflink stub. CopyTree's caller already falls back to a per-file walk via IsReflinkUnsupported, so Windows behavior is unchanged from before Reflink shared/copy subtrees in a single syscall #22.

Test plan

  • GOOS=windows GOARCH=amd64 go build ./... succeeds
  • GOOS=linux GOARCH=amd64 go build ./... succeeds
  • GOOS=darwin GOARCH=arm64 go build ./... succeeds
  • make test passes
  • After merge, push a v0.6.1 tag and confirm the Release workflow succeeds

The reflink tree-clone work in #22 added tryCloneTree only to the
darwin and linux build-tagged files, leaving reflink_other.go without
the symbol. That broke the Windows release build with
"undefined: tryCloneTree" at fscopy.go:81. Add a stub returning
errReflinkUnsupported so CopyTree falls back to the per-file walk on
Windows and other unsupported platforms.
@bkildow bkildow merged commit 36b0ab9 into main Apr 27, 2026
@bkildow bkildow deleted the fix/windows-clone-tree-stub branch April 27, 2026 18:26
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