From 4dbc028cb0bc52f63556dd7bc5efac32e5a9b92b Mon Sep 17 00:00:00 2001 From: juj Date: Wed, 5 May 2021 04:02:25 +0300 Subject: [PATCH] Remove explicit closure install step, the first install command does already seem to install google-closure-compiler-windows at least. (#803) --- emsdk.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/emsdk.py b/emsdk.py index 55b943f..56e3ef7 100644 --- a/emsdk.py +++ b/emsdk.py @@ -1418,34 +1418,6 @@ def emscripten_npm_install(tool, directory): errlog('Error running %s:\n%s' % (e.cmd, e.output)) return False - # Manually install the appropriate native Closure Compiler package - # This is currently needed because npm ci will install the packages - # for Closure for all platforms, adding 180MB to the download size - # There are two problems here: - # 1. npm ci does not consider the platform of optional dependencies - # https://github.com/npm/cli/issues/558 - # 2. A bug with the native compiler has bloated the packages from - # 30MB to almost 300MB - # https://github.com/google/closure-compiler-npm/issues/186 - # If either of these bugs are fixed then we can remove this exception - closure_compiler_native = '' - if LINUX and ARCH in ('x86', 'x86_64'): - closure_compiler_native = 'google-closure-compiler-linux' - if MACOS and ARCH in ('x86', 'x86_64'): - closure_compiler_native = 'google-closure-compiler-osx' - if WINDOWS and ARCH == 'x86_64': - closure_compiler_native = 'google-closure-compiler-windows' - if closure_compiler_native: - print('Running post-install step: npm install', closure_compiler_native) - try: - subprocess.check_output( - [npm, 'install', '--production', '--no-optional', closure_compiler_native], - cwd=directory, stderr=subprocess.STDOUT, env=env, - universal_newlines=True) - except subprocess.CalledProcessError as e: - errlog('Error running %s:\n%s' % (e.cmd, e.output)) - return False - print('Done running: npm ci') return True