From a4a423a083f42ee737aab0e4cc26d6d1177f822d Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Fri, 21 Jun 2019 21:52:00 -0700 Subject: [PATCH] build: fix build failures with worker mode cache and @types/events (#31325) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Errors observed only in tests on CircleCI — was not reproducible locally. ``` ERROR: /home/circleci/ng/packages/http/test/BUILD.bazel:3:1: Compiling TypeScript (devmode) //packages/http/test:test_lib failed (Exit 1): tsc_wrapped failed: error executing command (cd /home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular && \ exec env - \ BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 \ PATH=/bin:/usr/bin:/usr/local/bin \ bazel-out/host/bin/external/npm/@bazel/typescript/bin/tsc_wrapped @@bazel-out/k8-fastbuild/bin/packages/http/test/test_lib_es5_tsconfig.json) Execution platform: //tools:rbe_ubuntu1604-angular Compilation failed Error: missing input digest for /home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular/external/npm/node_modules/@types/events/index.d.ts. ERROR: /home/circleci/ng/packages/benchpress/test/BUILD.bazel:3:1: Compiling TypeScript (devmode) //packages/benchpress/test:test_lib failed (Exit 1): tsc_wrapped failed: error executing command (cd /home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular && \ exec env - \ BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 \ PATH=/bin:/usr/bin:/usr/local/bin \ bazel-out/host/bin/external/npm/@bazel/typescript/bin/tsc_wrapped @@bazel-out/k8-fastbuild/bin/packages/benchpress/test/test_lib_es5_tsconfig.json) Execution platform: //tools:rbe_ubuntu1604-angular Compilation failed Error: missing input digest for /home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular/external/npm/node_modules/@types/events/index.d.ts ERROR: C:/codefresh/volume/angular/packages/compiler/test/css_parser/BUILD.bazel:3:1: Compiling TypeScript (devmode) //packages/compiler/test/css_parser:css_parser_lib failed (Exit 1): tsc_wrapped.exe failed: error executing command cd C:/users/containeradministrator/_bazel_containeradministrator/zquin2l6/execroot/angular SET PATH=C:\msys64\usr\bin;C:\msys64\bin;C:\Windows;C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0 SET RUNFILES_MANIFEST_ONLY=1 bazel-out/host/bin/external/npm/@bazel/typescript/bin/tsc_wrapped.exe @@bazel-out/x64_windows-fastbuild/bin/packages/compiler/test/css_parser/css_parser_lib_es5_tsconfig.json Execution platform: @bazel_tools//platforms:host_platform Compilation failed Error: missing input digest for C:/users/containeradministrator/_bazel_containeradministrator/zquin2l6/execroot/angular/external/npm/node_modules/@types/events/index. d.ts ``` PR Close #31325 --- packages/compiler-cli/BUILD.bazel | 3 ++- .../compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel | 1 - packages/zone.js/test/BUILD.bazel | 2 +- tools/defaults.bzl | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/compiler-cli/BUILD.bazel b/packages/compiler-cli/BUILD.bazel index 823adbe66b..3eabad14d7 100644 --- a/packages/compiler-cli/BUILD.bazel +++ b/packages/compiler-cli/BUILD.bazel @@ -43,7 +43,8 @@ ts_library( "//packages/compiler-cli/src/ngtsc/typecheck", "//packages/compiler-cli/src/ngtsc/util", "@npm//@bazel/typescript", - "@npm//@types", + "@npm//@types/chokidar", + "@npm//@types/node", "@npm//reflect-metadata", "@npm//tsickle", "@npm//typescript", diff --git a/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel index fae0105f2b..1dc6cf811b 100644 --- a/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel @@ -20,7 +20,6 @@ ng_module( ], deps = [ "//packages/core", - "@npm//@types", "@npm//tslib", ], ) diff --git a/packages/zone.js/test/BUILD.bazel b/packages/zone.js/test/BUILD.bazel index 0d35ad8e1f..c13e89f703 100644 --- a/packages/zone.js/test/BUILD.bazel +++ b/packages/zone.js/test/BUILD.bazel @@ -171,7 +171,7 @@ ts_library( testonly = True, srcs = ["npm_package/npm_package.spec.ts"], deps = [ - "@npm//@types", + "@npm//@types/shelljs", ], ) diff --git a/tools/defaults.bzl b/tools/defaults.bzl index 13b45a92c1..5c4dae6d0f 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -83,6 +83,7 @@ def ts_library(tsconfig = None, testonly = False, deps = [], module_name = None, # Match the types[] in //packages:tsconfig-test.json deps.append("@npm//@types/jasmine") deps.append("@npm//@types/node") + deps.append("@npm//@types/events") if not tsconfig and testonly: tsconfig = _DEFAULT_TSCONFIG_TEST @@ -104,6 +105,7 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps # Match the types[] in //packages:tsconfig-test.json deps.append("@npm//@types/jasmine") deps.append("@npm//@types/node") + deps.append("@npm//@types/events") if not tsconfig and testonly: tsconfig = _DEFAULT_TSCONFIG_TEST