Skip to content

Commit 877cde8

Browse files
committed
Revert "build: wire up new CLDR generation tool within Bazel (angular#42230)" (angular#42583)
This reverts commit 4957da8. PR Close angular#42583
1 parent bf0e82c commit 877cde8

File tree

17 files changed

+5631
-1427
lines changed

17 files changed

+5631
-1427
lines changed

.ng-dev/format.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ export const format: FormatConfig = {
2626
'!dev-infra/build-worker.js',
2727
// Do not format compliance test-cases since they must match generated code
2828
'!packages/compiler-cli/test/compliance/test_cases/**/*.js',
29-
// Do not format the locale files which are checked-in for Google3, but generated using
30-
// the `generate-locales-tool` from `packages/common/locales`.
31-
'!packages/core/src/i18n/locale_en.ts',
32-
'!packages/common/locales/closure-locale.ts',
33-
'!packages/common/src/i18n/currencies.ts',
3429
]
3530
},
3631
'buildifier': true

packages/common/BUILD.bazel

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1-
load("@build_bazel_rules_nodejs//:index.bzl", "generated_file_test")
2-
load("//packages/common/locales:index.bzl", "generate_base_currencies_file")
31
load("//tools:defaults.bzl", "ng_module", "ng_package", "ts_api_guardian_test_npm_package")
42

53
package(default_visibility = ["//visibility:public"])
64

7-
# This generates the `src/i18n/currencies.ts` file through the `generate-locales` tool. Since
8-
# the base currencies file is checked-in for Google3, we add a `generated_file_test` to ensure
9-
# the checked-in file is up-to-date. To disambiguate from the test, we use a more precise target
10-
# name here.
11-
generate_base_currencies_file(
12-
name = "base_currencies_file_generated",
13-
output_file = "base_currencies_generated.ts",
14-
)
15-
16-
generated_file_test(
17-
name = "base_currencies_file",
18-
src = "src/i18n/currencies.ts",
19-
generated = ":base_currencies_file_generated",
20-
)
21-
225
ng_module(
236
name = "common",
247
srcs = glob(
Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,18 @@
1-
load("@build_bazel_rules_nodejs//:index.bzl", "generated_file_test")
2-
load("//packages/common/locales:index.bzl", "LOCALES", "generate_all_locale_files", "generate_closure_locales_file")
31
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
42

53
package(default_visibility = ["//visibility:public"])
64

7-
# This generates the `closure-locale.ts` file through the `generate-locales` tool. Since
8-
# the `closure-locale.ts` file is checked-in for Google3, we add a `generated_file_test` to
9-
# ensure the checked-in file is up-to-date. To disambiguate from the test, we use a more
10-
# precise target name here.
11-
generate_closure_locales_file(
12-
name = "closure_locales_file_generated",
13-
output_file = "closure_locales_generated.ts",
14-
)
15-
16-
generated_file_test(
17-
name = "closure_locale_file",
18-
src = "closure-locale.ts",
19-
generated = ":closure_locales_file_generated",
20-
)
21-
22-
generate_all_locale_files(
23-
name = "locale_files",
24-
)
25-
265
ts_library(
276
name = "locales",
28-
# TODO(devversion): Remove glob for checked-in legacy locale files that haven't been
29-
# removed in the past (when CLDR has been updated). These can be removed in a major.
30-
srcs = [file for l in LOCALES for file in [
31-
"%s.ts" % l,
32-
"extra/%s.ts" % l,
33-
]] + glob(
34-
[
35-
"*.ts",
36-
"extra/*.ts",
37-
],
7+
srcs = glob(
8+
["**/*.ts"],
389
exclude = ["closure-locale.ts"],
3910
),
4011
)
4112

4213
pkg_npm(
4314
name = "package",
44-
srcs = ["package.json"],
15+
srcs = glob(["global/*.js"]) + ["package.json"],
4516
substitutions = {
4617
# Workaround for `.d.ts`` containing `/// <amd-module .../>`
4718
# which are generated in TypeScript v2.9, but not before.
@@ -54,7 +25,5 @@ pkg_npm(
5425
# null out the require reference passed into the module.
5526
"factory\\(require, exports\\)": "factory(null, exports)",
5627
},
57-
# TODO(devversion): Remove glob for checked-in legacy locale files that haven't been
58-
# removed in the past (when CLDR has been updated). These can be removed in a major.
59-
deps = ["global/%s.js" % l for l in LOCALES] + [":locales"] + glob(["global/*.js"]),
28+
deps = [":locales"],
6029
)

0 commit comments

Comments
 (0)