-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8k command line limit hit on Windows #3579
Comments
I loaded the content of generated script in
I ran: That raises the question if Bazel could (at very least) detect this situation and if not handle it, then at least warn or even abort the execution, saying something like:
This or similar warning would save me 2 hours investigation. Even better question, if Bazel could recover from this situation, something that was proposed in Ninja tool, in this ninja-build/ninja#53:
As mentioned in my previous comment, If I dump 25k of the generated script into a script file and pass it to cmd.exe, all works just fine. It worth noting, that in Buck tool chain we used a different approach: we had a python script that executed query command on final artifacts, detected different classpath and produced/gathered the dependent libraries from within this Python script and created war archive. My first attempt to implement the same process in Bazel was to use a similar approach: Python script: During the Code Review, my reviewer, @damienmg noticed, that this apporach is rather too complex, to spawn Python script from the Skylark action and that the much simpler solution to that problem ist just to generate the shell script on the fly. This appears to be a general advice from Skylark actions, to just use shell scripts? Well, now we know, that this approach is flawed by the limit of 8191 chars of generated script. So yes, another solution would be to go back to the Python script approach, and only pass the root nodes of the dependency graph to the |
Closing due to no response for a long time, please reopen if necessary. |
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 withpkg_war.bzl
Skylark rule, by generating shell script on the fly an executing it withctx.action()
:It seems that the size of the srcipt it soo large, as its execution is failing with strange error: [1].
even so, the line seems to be sane:
If I generate a shell script from the output, dump it in a file, and execute this file from
cmd.exe
: [2]then the WAR archive is correctly created and i can check the
asm-commons-5.1.jar
file is in place:Moreover, Gerrit final artifact can be even installed:
[1] http://paste.openstack.org/show/618722/
[2] http://paste.openstack.org/show/618725/
The text was updated successfully, but these errors were encountered: