diff --git a/.aspect/workflows/config.yaml b/.aspect/workflows/config.yaml index c8c15cd1f3..f0e0564d93 100644 --- a/.aspect/workflows/config.yaml +++ b/.aspect/workflows/config.yaml @@ -16,6 +16,6 @@ tasks: name: Bazel 9 id: bazel-9 env: - USE_BAZEL_VERSION: 9.* + USE_BAZEL_VERSION: 9.x notifications: github: {} diff --git a/.bazelrc b/.bazelrc index 05a1149118..335cad29fe 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,8 +1,3 @@ -# TODO: migrate all root WORKSPACE dependencies to MODULE.bazel -# https://github.com/bazel-contrib/rules_nodejs/issues/3695 -common --noenable_bzlmod -common --enable_workspace - # Specifies desired output mode for running tests. # Valid values are # 'summary' to output only test status summary diff --git a/.bazelversion b/.bazelversion index 18bb4182dd..f7ee06693c 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.5.0 +9.0.0 diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index 38ac1bc11e..e4aa463b5b 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -1,7 +1,7 @@ bcr_test_module: module_path: "e2e/smoke" matrix: - bazel: ["7.x", "8.x", "9.*"] + bazel: ["7.x", "8.x", "9.x"] platform: ["debian11", "macos", "ubuntu2204", "windows"] tasks: run_tests: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cc74078d16..df77596c82 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] bazel: - - 9.* + - 9.x folder: - e2e/headers - e2e/smoke diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index c1e783a49f..0000000000 --- a/WORKSPACE +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -workspace(name = "rules_nodejs") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -# -# Install rules_nodejs dev dependencies -# - -load("//:repositories.bzl", "rules_nodejs_dev_dependencies") - -rules_nodejs_dev_dependencies() - -load("@bazel_features//:deps.bzl", "bazel_features_deps") - -bazel_features_deps() - -# -# Setup rules_nodejs npm dependencies -# - -load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains") - -# The order matters because Bazel will provide the first registered toolchain when a rule asks Bazel to select it -# This applies to the resolved_toolchain -nodejs_register_toolchains( - name = "node16", - node_version = "16.5.0", -) - -nodejs_register_toolchains( - name = "node17", - node_version = "17.9.1", -) - -http_archive( - name = "npm_typescript", - build_file = "typescript.BUILD", - sha256 = "6e2faae079c9047aa921e8a307f0cec0da4dc4853e20bb31d18acc678f5bf505", - urls = ["https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz"], -) - -http_archive( - name = "npm_types_node", - build_file = "types_node.BUILD", - sha256 = "6ef16adadc11a80601c023e1271887425c5c5c1867266d35493c7e92d7cc00fa", - urls = ["https://registry.npmjs.org/@types/node/-/node-16.18.23.tgz"], -) - -# -# Dependencies & toolchains needed for unit tests & generating documentation -# - -load("@bazel_lib//lib:repositories.bzl", "bazel_lib_dependencies", "register_copy_directory_toolchains", "register_copy_to_directory_toolchains") - -bazel_lib_dependencies() - -register_copy_directory_toolchains() - -register_copy_to_directory_toolchains() - -# Needed for starlark unit testing -load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") - -bazel_skylib_workspace() - -load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") - -compatibility_proxy_repo() - -# Buildifier -load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") - -buildifier_prebuilt_deps() - -load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains") - -buildifier_prebuilt_register_toolchains() diff --git a/internal/tsc.bzl b/internal/tsc.bzl index 6f6b2b3978..ec82fa9e0a 100644 --- a/internal/tsc.bzl +++ b/internal/tsc.bzl @@ -34,9 +34,9 @@ def tsc(name, srcs, tsconfig, **kwargs): "--outDir", "$(RULEDIR)", ]), - toolchains = ["//nodejs:toolchain_type"] if _TOOLCHAIN_TYPES_SUPPORTED else ["@node16_toolchains//:resolved_toolchain"], + toolchains = ["//nodejs:toolchain_type"] if _TOOLCHAIN_TYPES_SUPPORTED else ["@nodejs_toolchains//:resolved_toolchain"], tools = ([] if _TOOLCHAIN_TYPES_SUPPORTED else [ - "@node16_toolchains//:resolved_toolchain", + "@nodejs_toolchains//:resolved_toolchain", ]) + [ "@npm_typescript", "@npm_types_node", diff --git a/repositories.bzl b/repositories.bzl deleted file mode 100644 index 63e4fccc87..0000000000 --- a/repositories.bzl +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2018 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Dependency-related rules defining our dependency versions. - -Fulfills similar role as the package.json file. -""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive = "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -def http_archive(**kwargs): - maybe(_http_archive, **kwargs) - -def rules_nodejs_dev_dependencies(): - """ - Fetch dependencies needed for local development, but not needed by users. - - These are in this file to keep version information in one place, and make the WORKSPACE - shorter. - """ - http_archive( - name = "bazel_features", - sha256 = "5ab1a90d09fd74555e0df22809ad589627ddff263cff82535815aa80ca3e3562", - strip_prefix = "bazel_features-1.39.0", - url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.39.0/bazel_features-v1.39.0.tar.gz", - ) - - http_archive( - name = "bazel_skylib", - sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f", - urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz"], - ) - - http_archive( - name = "bazel_lib", - sha256 = "06cbcd5b98af3f530d20b505a89fb6761f09950b780cdd7726df42ee84b49d04", - strip_prefix = "bazel-lib-3.1.1", - url = "https://github.com/bazel-contrib/bazel-lib/releases/download/v3.1.1/bazel-lib-v3.1.1.tar.gz", - ) - - http_archive( - name = "buildifier_prebuilt", - sha256 = "e31fe636a5004eb50b7b47ec31c3cea0afd597d14bb1991832aa213038837ecf", - strip_prefix = "buildifier-prebuilt-8.0.0", - urls = ["http://github.com/keith/buildifier-prebuilt/archive/8.0.0.tar.gz"], - ) - - http_archive( - name = "rules_cc", - sha256 = "458b658277ba51b4730ea7a2020efdf1c6dcadf7d30de72e37f4308277fa8c01", - strip_prefix = "rules_cc-0.2.16", - url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.16/rules_cc-0.2.16.tar.gz", - )