-
Notifications
You must be signed in to change notification settings - Fork 4.4k
8k command line limit hit on Windows #3579
Description
FTR: the WAR archive generation gerrit build tool chain works as expected on sane platforms (Linux and Mac Os X). This issue is only Windows specific.
On most recent Bazel master (ab38960), I'm trying to build gerrit code review WAR archive: headless.war. In the very last step, we are gathering the WAR archive with pkg_war.bzl Skylark rule, by generating shell script on the fly an executing it with ctx.action():
ctx.action(
inputs = inputs,
outputs = [war],
mnemonic = 'WAR',
command = '\n'.join(cmd),
use_default_shell_env = True,
)It seems that the size of the srcipt it soo large, as its execution is failing with strange error: [1].
cp: missing destination file operand after '/tmp/_bazel_davido/_biltsqa/execroot/gerrit/external/ow2_asm_commons/jar/a'
even so, the line seems to be sane:
cp $(pwd)/external/ow2_asm_commons/jar/asm-commons-5.1.jar bazel-out/msvc_x64-fastbuild/bin/headless.war.buildoutput/WEB-INF/lib/asm-commons-5.1.jar
If I generate a shell script from the output, dump it in a file, and execute this file from cmd.exe: [2]
C:/msys64/usr/bin/bash.exe -c C:/Users/davido/projects/gerrit/pkg_war.sh
then the WAR archive is correctly created and i can check the asm-commons-5.1.jar file is in place:
$ unzip -t bazel-out/msvc_x64-fastbuild/bin/headless.war | grep asm-commons-5.1.jar
testing: WEB-INF/lib/asm-commons-5.1.jar OK
Moreover, Gerrit final artifact can be even installed:
C:\msys64\tmp\_bazel_davido\_biLtSqA\execroot\gerrit>java -jar bazel-out/msvc_x64-fastbuild/bin/headless.war init -d test_site
Using secure store: com.google.gerrit.server.securestore.DefaultSecureStore
[2017-08-17 23:20:34,048] [main] INFO com.google.gerrit.server.config.GerritServerConfigProvider : No C:\msys64\tmp\_bazel_davido\_biLtSqA\execroot\gerrit\test_site\etc\gerrit.config; assuming defaults
*** Gerrit Code Review dev
***
Create 'C:\msys64\tmp\_bazel_davido\_biLtSqA\execroot\gerrit\test_site' [Y/n]?
[...]
[1] http://paste.openstack.org/show/618722/
[2] http://paste.openstack.org/show/618725/