Adapt web/ and proto/ to recent upstream build-rule migrations Two unrelated rule-set migrations landed in gerrit master and require matching adaptation here: * web/BUILD: TypeScript rules migrated from @bazel/typescript to aspect_rules_ts. Switch the ts_config + ts_project loads to @aspect_rules_ts//ts:defs.bzl; consume node_modules from //plugins:node_modules and //polygerrit-ui:node_modules (the aspect_rules_js pnpm-backed targets) instead of @plugins_npm and @ui_dev_npm; drop the explicit tsc binding (aspect_rules_ts handles it). gerrit_js_bundle moves to @com_googlesource_gerrit_bazlets//js:defs.bzl. * proto/BUILD: protobuf upstream absorbed the proto rules into @protobuf//bazel:. Switch the proto_library load from @rules_proto//proto:defs.bzl to @protobuf//bazel:proto_library.bzl, matching the @protobuf//bazel:java_proto_library.bzl path already in this file. Change-Id: If955947f657b3234b488af53764782f7108d2524
diff --git a/proto/BUILD b/proto/BUILD index 82c8885..db93f30 100644 --- a/proto/BUILD +++ b/proto/BUILD
@@ -1,5 +1,5 @@ load("@protobuf//bazel:java_proto_library.bzl", "java_proto_library") -load("@rules_proto//proto:defs.bzl", "proto_library") +load("@protobuf//bazel:proto_library.bzl", "proto_library") proto_library( name = "cache_proto",
diff --git a/web/BUILD b/web/BUILD index f8b0e82..cea9c3e 100644 --- a/web/BUILD +++ b/web/BUILD
@@ -1,7 +1,7 @@ -load("//tools/bzl:plugin.bzl", "gerrit_plugin") +load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project") +load("@com_googlesource_gerrit_bazlets//js:defs.bzl", "gerrit_js_bundle") +load("//tools/bzl:js.bzl", "web_test_runner") load("//tools/js:eslint.bzl", "plugin_eslint") -load("//tools/bzl:js.bzl", "gerrit_js_bundle", "web_test_runner") -load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") package_group( name = "visibility", @@ -14,7 +14,7 @@ name = "tsconfig", src = "tsconfig.json", deps = [ - "//plugins:tsconfig-plugins-base.json", + "//plugins:tsconfig-plugins-base", ], ) @@ -26,11 +26,9 @@ ), incremental = True, out_dir = "_bazel_ts_out", - tsc = "//tools/node_tools:tsc-bin", tsconfig = ":tsconfig", deps = [ - "@plugins_npm//@gerritcodereview/typescript-api", - "@plugins_npm//lit", + "//plugins:node_modules", ], ) @@ -39,12 +37,11 @@ srcs = glob(["**/*.ts"]), incremental = True, out_dir = "_bazel_ts_out_tests", - tsc = "//tools/node_tools:tsc-bin", tsconfig = ":tsconfig", visibility = ["//visibility:public"], deps = [ - "@plugins_npm//:node_modules", - "@ui_dev_npm//:node_modules", + "//plugins:node_modules", + "//polygerrit-ui:node_modules", ], ) @@ -61,8 +58,8 @@ name = "web_test_runner", srcs = ["web_test_runner.sh"], data = [ - ":tsconfig", ":checks-ts-tests", - "@plugins_npm//:node_modules", + ":tsconfig", + "//plugins:node_modules", ], )