Skip to content

Windows: Some build steps fail with "The command line is too long" #2080

Open
@cwillisf

Description

@cwillisf

Expected Behavior

Building scratch-blocks on Windows should succeed.

Excerpt from expected output (taken from a Linux build):

Using local compiler: google-closure-compiler ...

SUCCESS: blockly_compressed_vertical.js
Size changed from 3124 KB to 956 KB (31%).
SUCCESS: blockly_uncompressed_vertical.js
SUCCESS: blockly_uncompressed_horizontal.js
SUCCESS: blockly_compressed_horizontal.js
Size changed from 3094 KB to 945 KB (31%).
SUCCESS: blocks_compressed_horizontal.js
Size changed from 39 KB to 19 KB (49%).
blocks_vertical/vertical_extensions.js:54: WARNING - Misplaced function annotation. This JSDoc is not attached to a function node. Are you missing parentheses?
  return function() {
  ^^^^^^^^^^^^^^^^^^^

0 error(s), 1 warning(s)
SUCCESS: blocks_compressed_vertical.js
Size changed from 179 KB to 90 KB (50%).
SUCCESS: blocks_compressed.js
Size changed from 22 KB to 8 KB (37%).

Actual Behavior

The output of npm i (which internally runs python build.py among other steps) includes the message "The command line is too long" more than once. There are at least two problems here:

  • Some invocations of google-closure-compiler.cmd fail because the command line is too long
  • The overall build process reports success despite the failed invocations of the compiler

Excerpt from the output (note the absence of "SUCCESS" lines for blockly_compressed_vertical.js and blockly_compressed_horizontal.js):

Using local compiler: google-closure-compiler.cmd ...

The command line is too long.
UNKNOWN ERROR
The command line is too long.
UNKNOWN ERROR
SUCCESS: blockly_uncompressed_horizontal.js
SUCCESS: blockly_uncompressed_vertical.js
SUCCESS: blocks_compressed_horizontal.js
Size changed from 39 KB to 19 KB (49%).
blocks_vertical/vertical_extensions.js:54: WARNING - Misplaced function annotation. This JSDoc is not attached to a function node. Are you missing parentheses?
  return function() {
  ^^^^^^^^^^^^^^^^^^^

0 error(s), 1 warning(s)
SUCCESS: blocks_compressed_vertical.js
Size changed from 183 KB to 90 KB (49%).
SUCCESS: blocks_compressed.js
Size changed from 22 KB to 8 KB (37%).

Steps to Reproduce

  1. On Windows, open a command prompt or PowerShell
    • To reproduce this issue, do not use Cygwin, MinGW, Git Bash, WSL, etc.
  2. Clone the scratch-blocks repository
  3. In the scratch-blocks directory, run npm i

Operating System and Browser

Windows 10 (probably any version of Windows capable of running npm)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions