Skip to content

copy_directory and copy_to_directory code needs fix before upgrade to go 1.23+ #1146

@peakschris

Description

@peakschris

When I attempt to upgrade to go 1.23+ I see the following errors on windows:

cd e2e\smoke
bazel test //...
ERROR: D:/workdir/github/peakschris/bazel-lib/e2e/smoke/BUILD.bazel:112:15: Copying directory d failed: (Exit 1): copy_directory.exe failed: error executing CopyDirectory command (from target //:copy_directory_mtime_case) bazel-out\x64_windows-opt-exec-ST-d57f47055a04\bin\external\aspect_bazel_lib+\tools\copy_directory\copy_directory_\copy_directory.exe d bazel-out/x64_windows-fastbuild/bin/copy_directory_mtime_out ... (remaining 1 argument skipped)
2025/08/15 07:03:38 d is not a regular file
walking bazel-out\x64_windows-fastbuild\bin\copy_directory_mtime_out
copying regular file: bazel-out\x64_windows-fastbuild\bin\copy_directory_mtime_out

The code in tools/common/copy.go is not identifying directories as such.

@fmeum tracked it down to possibly this: https://tip.golang.org/doc/go1.23#ospkgos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions