Skip to content

Commit 3c3153b

Browse files
paldepindCopilot
andcommitted
JavaScript: avoid Windows ZIP command-line length limit
Pass wrapper and native archive entries to Bazel zipper through response files instead of expanding every path on the command line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 86598cdc-5945-4d8e-9ea4-eeb4eb4356ba
1 parent f723087 commit 3c3153b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎javascript/extractor/lib/typescript/BUILD.bazel‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ genrule(
5959
" cygwin|msys|win32) OUT=$$(cygpath -w $$OUT); NATIVE_OUT=$$(cygpath -w $$NATIVE_OUT);;",
6060
"esac",
6161
"",
62-
"$$BAZEL_ROOT/$(execpath @bazel_tools//tools/zip:zipper) cC $$OUT $$(find typescript-parser-wrapper -name '*' -print)",
62+
# Use response files to stay below Windows' command-line length limit.
63+
"find typescript-parser-wrapper -print > wrapper-files",
64+
"$$BAZEL_ROOT/$(execpath @bazel_tools//tools/zip:zipper) cC $$OUT @wrapper-files",
6365
"cd native",
64-
"$$BAZEL_ROOT/$(execpath @bazel_tools//tools/zip:zipper) cC $$NATIVE_OUT $$(find typescript-* -print)",
66+
"find typescript-* -print > native-files",
67+
"$$BAZEL_ROOT/$(execpath @bazel_tools//tools/zip:zipper) cC $$NATIVE_OUT @native-files",
6568
"rm -rf $$TEMP",
6669
]),
6770
tools = [

0 commit comments

Comments
 (0)