Skip to content
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

"The command line is too long" from build\all.py #1228

Closed
sandersaares opened this issue Jan 17, 2018 · 4 comments
Closed

"The command line is too long" from build\all.py #1228

sandersaares opened this issue Jan 17, 2018 · 4 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@sandersaares
Copy link
Contributor

sandersaares commented Jan 17, 2018

I pulled latest master branch and got the error below when running build\all.py.

This is on Windows 10 v1709.

c:\Source\shaka-player>c:\Python27\python.exe build\all.py
[INFO] Generating Closure dependencies...
[INFO] Running Closure Compiler linter...
[INFO] Running eslint...
The command line is too long.

The script stops at the above point.

@joeyparrish
Copy link
Member

joeyparrish commented Jan 17, 2018

Here are some numbers on command-line length taken from my workstation. These depend on the state of the project today, the length of the path to my working directory, and other factors. But these should provide a sense of scale.

step command length
Generating Closure dependencies 162
Running Closure Compiler linter 17776
Running eslint 17760
Running htmlhint 347
Checking the tests for type errors 17842
Checking the usability of generated externs 9615 + 2097
Compiling the library (debug) 10369 + 9624
Compiling the demo app (debug) 3114
Compiling the receiver app (debug) 2767
Compiling the library (release) 10455 + 9618
Compiling the demo app (release) 3096
Compiling the receiver app (release) 2749

Windows has an 8kB limit on command line length. It's not clear to me why we would have only recently started tripping over this limit, or if there are any exceptions. All of these commands are invoked from python using subprocess.Popen with an argument array.

@joeyparrish joeyparrish self-assigned this Jan 17, 2018
@joeyparrish
Copy link
Member

The problem seems to come from the addition of eslint, specifically. It's the long list of files, combined with the use of node_modules/.bin/eslint.cmd on Windows. The cmd script passes through the arguments, which breaks the command-line limit. python's subprocess.Popen is not what triggers the error.

@joeyparrish joeyparrish added type: bug Something isn't working correctly and removed needs triage labels Jan 17, 2018
@joeyparrish joeyparrish added this to the v2.4.0 milestone Jan 17, 2018
@joeyparrish
Copy link
Member

Related to work on issue #1157

shaka-bot pushed a commit that referenced this issue Jan 18, 2018
Git checks out files with native newlines, which is making eslint angry.

Issue #1157
Issue #1228

Change-Id: If83adca5c206581c5fe1883a07c4d5c84a326663
joeyparrish added a commit that referenced this issue Jan 19, 2018
Git checks out files with native newlines, which is making eslint angry.

Issue #1157
Issue #1228

Change-Id: If83adca5c206581c5fe1883a07c4d5c84a326663
joeyparrish added a commit that referenced this issue Jan 19, 2018
This avoids line-length limits on Windows in the node module's
pass-through shell script.

The long list of files, combined with a node module's bin file,
tripped the Windows command-line length limit of 8k.  The transition
to eslint, therefore, broke the Windows build.

Issue #1157
Closes #1228

Change-Id: Ie57624efbbbfb4a27035e82ab12e788d18652ae3
@joeyparrish
Copy link
Member

Cherry-picked to v2.3.1.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants