Add tryCloneTree stub for non-darwin/linux platforms#23
Merged
Conversation
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.
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.
Summary
tryCloneTreeonly inreflink_darwin.goandreflink_linux.go. The!darwin && !linuxbuild (used bygoreleaserfor Windows) failed withundefined: tryCloneTreeatinternal/project/fscopy/fscopy.go:81, causing the v0.6.0 release workflow to fail.tryCloneTreestub toreflink_other.goreturningerrReflinkUnsupported, mirroring the existingtryReflinkstub.CopyTree's caller already falls back to a per-file walk viaIsReflinkUnsupported, so Windows behavior is unchanged from before Reflink shared/copy subtrees in a single syscall #22.Test plan
GOOS=windows GOARCH=amd64 go build ./...succeedsGOOS=linux GOARCH=amd64 go build ./...succeedsGOOS=darwin GOARCH=arm64 go build ./...succeedsmake testpassesv0.6.1tag and confirm the Release workflow succeeds