build: use fine grain dependencies for ts-api-guardian (#30051)
At the moment `ts_api_guardian_test` rule depends on the entire node_modules tree, this is causing an input file tree of over 71473 in the material repo which is failing RBE With this change we add only the required dependencies to as data attribute instead of the `@npm//:node_modules` With this change we should also reduce the `Too many open files in system` error that sometimes crops up PR Close #30051
This commit is contained in:
parent
9873356bd0
commit
f7960c024c
|
@ -16,6 +16,7 @@ ts_library(
|
|||
"@npm//@types/diff",
|
||||
"@npm//@types/minimist",
|
||||
"@npm//@types/node",
|
||||
"@npm//chalk",
|
||||
"@npm//diff",
|
||||
"@npm//minimist",
|
||||
"@npm//typescript",
|
||||
|
@ -41,7 +42,8 @@ npm_package(
|
|||
"package.json",
|
||||
],
|
||||
replacements = {
|
||||
"@angular//tools/ts-api-guardian": "@npm_ts_api_guardian//",
|
||||
"@angular//tools/ts-api-guardian:bin": "@npm_ts_api_guardian//:bin",
|
||||
"@angular//tools/ts-api-guardian:lib": "@npm//ts-api-guardian",
|
||||
"angular/tools/ts-api-guardian/": "npm_ts_api_guardian/",
|
||||
},
|
||||
deps = [
|
||||
|
@ -78,7 +80,6 @@ jasmine_node_test(
|
|||
"test/fixtures/*.patch",
|
||||
]) + [
|
||||
":ts-api-guardian",
|
||||
"@npm//chalk",
|
||||
# TODO: remove this once the boostrap.js workaround has been removed.
|
||||
":package.json",
|
||||
],
|
||||
|
@ -86,8 +87,7 @@ jasmine_node_test(
|
|||
)
|
||||
# END-INTERNAL
|
||||
|
||||
filegroup(
|
||||
name = "bin",
|
||||
srcs = glob(["lib/*.js"]) + ["bin/ts-api-guardian"],
|
||||
exports_files(
|
||||
["bin/ts-api-guardian"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
@ -33,11 +33,10 @@ def ts_api_guardian_test(
|
|||
"""Runs ts_api_guardian
|
||||
"""
|
||||
data += [
|
||||
# BEGIN-INTERNAL
|
||||
# Locally we need to add the TS build target
|
||||
# But it will replaced to @npm//ts-api-guardian when publishing
|
||||
"@angular//tools/ts-api-guardian:lib",
|
||||
# END-INTERNAL
|
||||
"@angular//tools/ts-api-guardian:bin",
|
||||
"@angular//tools/ts-api-guardian:bin/ts-api-guardian",
|
||||
]
|
||||
|
||||
args = [
|
||||
|
@ -58,7 +57,6 @@ def ts_api_guardian_test(
|
|||
nodejs_test(
|
||||
name = name,
|
||||
data = data,
|
||||
node_modules = "@npm//:node_modules",
|
||||
entry_point = "angular/tools/ts-api-guardian/bin/ts-api-guardian",
|
||||
templated_args = args + ["--verify", golden, actual],
|
||||
**kwargs
|
||||
|
@ -68,7 +66,6 @@ def ts_api_guardian_test(
|
|||
name = name + ".accept",
|
||||
testonly = True,
|
||||
data = data,
|
||||
node_modules = "@npm//:node_modules",
|
||||
entry_point = "angular/tools/ts-api-guardian/bin/ts-api-guardian",
|
||||
templated_args = args + ["--out", golden, actual],
|
||||
**kwargs
|
||||
|
|
Loading…
Reference in New Issue