Skip to content

Commit a7a3a04

Browse files
committed
build: adjust BUILD file external comment markers
Improvements to the syncing process allow for reduced usage of the comment markers. (cherry picked from commit e402c23)
1 parent 17b7e1b commit a7a3a04

File tree

16 files changed

+15
-61
lines changed

16 files changed

+15
-61
lines changed

packages/angular/cli/BUILD.bazel

+3-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55

66
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
77
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
8+
load("//tools:ng_cli_schema_generator.bzl", "cli_json_schema")
89
load("//tools:toolchain_info.bzl", "TOOLCHAINS_NAMES", "TOOLCHAINS_VERSIONS")
9-
10-
# @external_begin
1110
load("//tools:ts_json_schema.bzl", "ts_json_schema")
12-
load("//tools:ng_cli_schema_generator.bzl", "cli_json_schema")
13-
# @external_end
1411

1512
licenses(["notice"]) # MIT
1613

@@ -45,10 +42,11 @@ ts_library(
4542
"lib/config/workspace-schema.json",
4643
],
4744
) + [
45+
# @external_begin
4846
"//packages/angular/cli:lib/config/schema.json",
47+
# @external_end
4948
],
5049
module_name = "@angular/cli",
51-
# strict_checks = False,
5250
deps = [
5351
"//packages/angular_devkit/architect",
5452
"//packages/angular_devkit/architect/node",
@@ -129,7 +127,6 @@ ts_json_schema(
129127
name = "update_schematic_schema",
130128
src = "src/commands/update/schematic/schema.json",
131129
)
132-
# @external_end
133130

134131
ts_library(
135132
name = "angular-cli_test_lib",
@@ -141,7 +138,6 @@ ts_library(
141138
"node_modules/**",
142139
],
143140
),
144-
# strict_checks = False,
145141
deps = [
146142
":angular-cli",
147143
"//packages/angular_devkit/core",
@@ -164,7 +160,6 @@ ts_library(
164160
)
165161
]
166162

167-
# @external_begin
168163
genrule(
169164
name = "license",
170165
srcs = ["//:LICENSE"],

packages/angular/pwa/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ ts_library(
5555
name = "pwa_test_lib",
5656
testonly = True,
5757
srcs = glob(["pwa/**/*_spec.ts"]),
58-
# strict_checks = False,
5958
deps = [
6059
":pwa",
6160
"//packages/angular_devkit/schematics/testing",

packages/angular_devkit/architect/BUILD.bazel

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.io/license
55

6+
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
67
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
78
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
89
load("//tools:toolchain_info.bzl", "TOOLCHAINS_NAMES", "TOOLCHAINS_VERSIONS")
9-
10-
# @external_begin
1110
load("//tools:ts_json_schema.bzl", "ts_json_schema")
12-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
13-
# @external_end
1411

1512
licenses(["notice"]) # MIT
1613

@@ -60,7 +57,6 @@ ts_library(
6057
"//packages/angular_devkit/architect:src/progress-schema.ts",
6158
"//packages/angular_devkit/architect:builders/operator-schema.ts",
6259
],
63-
# strict_checks = False,
6460
data = glob(
6561
include = ["**/*.json"],
6662
exclude = [
@@ -82,7 +78,6 @@ ts_library(
8278
name = "architect_test_lib",
8379
testonly = True,
8480
srcs = glob(["src/**/*_spec.ts"]),
85-
# strict_checks = False,
8681
deps = [
8782
":architect",
8883
"//packages/angular_devkit/architect/testing",

packages/angular_devkit/architect/node/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ts_library(
1717
),
1818
module_name = "@angular-devkit/architect/node",
1919
module_root = "index.d.ts",
20-
# strict_checks = False,
2120
deps = [
2221
"//packages/angular_devkit/architect",
2322
"//packages/angular_devkit/core",

packages/angular_devkit/build_angular/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ ts_library(
198198
],
199199
),
200200
data = glob(["test/**/*"]),
201-
# strict_checks = False,
202201
deps = [
203202
":build_angular",
204203
":build_angular_test_utils",

packages/angular_devkit/core/BUILD.bazel

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1+
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
12
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
23
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
34
load("//tools:toolchain_info.bzl", "TOOLCHAINS_NAMES", "TOOLCHAINS_VERSIONS")
45

5-
# @external_begin
6-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
7-
# @external_end
8-
96
# Copyright Google Inc. All Rights Reserved.
107
#
118
# Use of this source code is governed by an MIT-style license that can be
@@ -36,8 +33,6 @@ ts_library(
3633
),
3734
module_name = "@angular-devkit/core",
3835
module_root = "src/index.d.ts",
39-
# The attribute below is needed in g3 to turn off strict typechecking
40-
# strict_checks = False,
4136
deps = [
4237
"@npm//@types/node",
4338
"@npm//ajv",
@@ -52,13 +47,13 @@ ts_library(
5247
],
5348
)
5449

50+
# @external_begin
51+
5552
ts_library(
5653
name = "core_test_lib",
5754
testonly = True,
5855
srcs = glob(["src/**/*_spec.ts"]),
5956
data = glob(["src/workspace/json/test/**/*.json"]),
60-
# The attribute below is needed in g3 to turn off strict typechecking
61-
# strict_checks = False,
6257
deps = [
6358
":core",
6459
"//packages/angular_devkit/core/node",
@@ -71,19 +66,13 @@ ts_library(
7166
name = "core_test_" + toolchain_name,
7267
srcs = [":core_test_lib"],
7368
toolchain = toolchain,
74-
deps = [
75-
# @node_module: ajv
76-
# @node_module: fast_json_stable_stringify
77-
# @node_module: source_map
78-
],
7969
)
8070
for toolchain_name, toolchain in zip(
8171
TOOLCHAINS_NAMES,
8272
TOOLCHAINS_VERSIONS,
8373
)
8474
]
8575

86-
# @external_begin
8776
genrule(
8877
name = "license",
8978
srcs = ["//:LICENSE"],

packages/angular_devkit/core/node/BUILD.bazel

+3-5
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ ts_library(
2424
data = ["package.json"],
2525
module_name = "@angular-devkit/core/node",
2626
module_root = "index.d.ts",
27-
# The attribute below is needed in g3 to turn off strict typechecking
28-
# strict_checks = False,
2927
deps = [
3028
"//packages/angular_devkit/core",
3129
"@npm//@types/node",
@@ -34,6 +32,8 @@ ts_library(
3432
],
3533
)
3634

35+
# @external_begin
36+
3737
ts_library(
3838
name = "node_test_lib",
3939
testonly = True,
@@ -60,13 +60,11 @@ ts_library(
6060
toolchain = toolchain,
6161
deps = [
6262
"@npm//chokidar",
63-
# @node_module: ajv
64-
# @node_module: fast_json_stable_stringify
65-
# @node_module: magic_string
6663
],
6764
)
6865
for toolchain_name, toolchain in zip(
6966
TOOLCHAINS_NAMES,
7067
TOOLCHAINS_VERSIONS,
7168
)
7269
]
70+
# @external_end

packages/angular_devkit/core/node/testing/BUILD.bazel

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ ts_library(
1919
),
2020
module_name = "@angular-devkit/core/node/testing",
2121
module_root = "index.d.ts",
22-
# The attribute below is needed in g3 to turn off strict typechecking
23-
# strict_checks = False,
2422
deps = [
2523
"//packages/angular_devkit/core",
2624
"//packages/angular_devkit/core/node",

packages/angular_devkit/schematics/BUILD.bazel

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1+
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
12
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
23
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
34
load("//tools:toolchain_info.bzl", "TOOLCHAINS_NAMES", "TOOLCHAINS_VERSIONS")
45

5-
# @external_begin
6-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
7-
# @external_end
8-
96
# Copyright Google Inc. All Rights Reserved.
107
#
118
# Use of this source code is governed by an MIT-style license that can be
@@ -26,8 +23,6 @@ ts_library(
2623
"src/**/*_benchmark.ts",
2724
],
2825
),
29-
# The attribute below is needed in g3 to turn off strict typechecking
30-
# strict_checks = False,
3126
data = glob(
3227
include = ["**/*.json"],
3328
exclude = [
@@ -47,6 +42,8 @@ ts_library(
4742
],
4843
)
4944

45+
# @external_begin
46+
5047
ts_library(
5148
name = "schematics_test_lib",
5249
testonly = True,
@@ -76,7 +73,6 @@ ts_library(
7673
)
7774
]
7875

79-
# @external_begin
8076
genrule(
8177
name = "license",
8278
srcs = ["//:LICENSE"],

packages/angular_devkit/schematics/tasks/BUILD.bazel

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ ts_library(
2121
data = ["package.json"],
2222
module_name = "@angular-devkit/schematics/tasks",
2323
module_root = "index.d.ts",
24-
# The attribute below is needed in g3 to turn off strict typechecking
25-
# strict_checks = False,
2624
deps = [
2725
"//packages/angular_devkit/core",
2826
"//packages/angular_devkit/core/node",

packages/angular_devkit/schematics/tasks/node/BUILD.bazel

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ ts_library(
1919
),
2020
module_name = "@angular-devkit/schematics/tasks/node",
2121
module_root = "index.d.ts",
22-
# The attribute below is needed in g3 to turn off strict typechecking
23-
# strict_checks = False,
2422
deps = [
2523
"//packages/angular_devkit/core",
2624
"//packages/angular_devkit/core/node",

packages/angular_devkit/schematics/tools/BUILD.bazel

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ ts_library(
2323
data = ["package.json"],
2424
module_name = "@angular-devkit/schematics/tools",
2525
module_root = "index.d.ts",
26-
# The attribute below is needed in g3 to turn off strict typechecking
27-
# strict_checks = False,
2826
deps = [
2927
"//packages/angular_devkit/core",
3028
"//packages/angular_devkit/core/node",

packages/angular_devkit/schematics_cli/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ ts_library(
6969
"bin/**/*_spec.ts",
7070
],
7171
),
72-
# strict_checks = False,
7372
deps = [
7473
":schematics_cli",
7574
],

packages/schematics/angular/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ ts_library(
5656
"//packages/schematics/angular:" + src.replace(".json", ".ts")
5757
for (src, _) in ALL_SCHEMA_TARGETS
5858
],
59-
# strict_checks = False,
6059
data = glob(
6160
include = [
6261
"collection.json",

tools/ng_cli_schema_generator.bzl

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.io/license
55

6-
# @external_begin
76
def _cli_json_schema_interface_impl(ctx):
87
args = [
98
ctx.files.src[0].path,
@@ -36,11 +35,10 @@ cli_json_schema = rule(
3635
"_binary": attr.label(
3736
default = Label("//tools:ng_cli_schema"),
3837
executable = True,
39-
cfg = "host",
38+
cfg = "exec",
4039
),
4140
},
4241
outputs = {
4342
"json": "%{out}",
4443
},
4544
)
46-
# @external_end

tools/ts_json_schema.bzl

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.io/license
55

6-
# @external_begin
76
def _ts_json_schema_interface_impl(ctx):
87
args = [
98
ctx.files.src[0].path,
@@ -35,14 +34,13 @@ _ts_json_schema_interface = rule(
3534
"_binary": attr.label(
3635
default = Label("//tools:quicktype_runner"),
3736
executable = True,
38-
cfg = "host",
37+
cfg = "exec",
3938
),
4039
},
4140
outputs = {
4241
"ts": "%{out}",
4342
},
4443
)
45-
# @external_end
4644

4745
# Generates a TS file that contains the interface for a JSON Schema file. Takes a single `src`
4846
# argument as input, an optional data field for reference files, and produces a
@@ -52,11 +50,9 @@ _ts_json_schema_interface = rule(
5250
def ts_json_schema(name, src, data = []):
5351
out = src.replace(".json", ".ts")
5452

55-
# @external_begin
5653
_ts_json_schema_interface(
5754
name = name + ".interface",
5855
src = src,
5956
out = out,
6057
data = data,
6158
)
62-
# @external_end

0 commit comments

Comments
 (0)