Skip to content

Commit

Permalink
Upgrade bazel to 8.0.0.
Browse files Browse the repository at this point in the history
Previously, we were using 8.0.0rc1.
In particular, this upgrade means we need to explicitly
import more rules, as they've been moved out of the core bazel repo.
  • Loading branch information
criemen committed Dec 10, 2024
1 parent 7dd10f7 commit 53ca508
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,12 @@ common --registry=https://bcr.bazel.build

common --@rules_dotnet//dotnet/settings:strict_deps=false

# Reduce this eventually to empty, once we've fixed all our usages of java, and https://github.com/bazel-contrib/rules_go/issues/4193 is fixed
common --incompatible_autoload_externally="+@rules_java,+@rules_shell"

build --java_language_version=17
build --tool_java_language_version=17
build --tool_java_runtime_version=remotejdk_17
build --java_runtime_version=remotejdk_17

try-import %workspace%/local.bazelrc
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.0rc1
8.0.0
9 changes: 5 additions & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ local_path_override(
# see https://registry.bazel.build/ for a list of available packages

bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_go", version = "0.50.0")
bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1")
bazel_dep(name = "rules_python", version = "0.36.0")
bazel_dep(name = "rules_python", version = "0.40.0")
bazel_dep(name = "rules_shell", version = "0.3.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "absl")
bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "absl")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
bazel_dep(name = "fmt", version = "10.0.0")
bazel_dep(name = "rules_kotlin", version = "2.0.0-codeql.1")
bazel_dep(name = "gazelle", version = "0.38.0")
bazel_dep(name = "gazelle", version = "0.40.0")
bazel_dep(name = "rules_dotnet", version = "0.17.4")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
bazel_dep(name = "rules_rust", version = "0.52.2")
Expand Down
2 changes: 2 additions & 0 deletions csharp/scripts/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary")

py_binary(
name = "gen-git-assembly-info",
srcs = ["gen-git-assembly-info.py"],
Expand Down
1 change: 1 addition & 0 deletions go/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load("@gazelle//:def.bzl", "gazelle")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
load("@rules_python//python:defs.bzl", "py_binary")
load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files")

gazelle(
Expand Down
1 change: 1 addition & 0 deletions java/kotlin-extractor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ load(
)
load("@rules_kotlin//kotlin:core.bzl", "kt_javac_options", "kt_kotlinc_options")
load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
load("@rules_python//python:defs.bzl", "py_binary")

package(default_visibility = ["//java/kotlin-extractor:__subpackages__"])

Expand Down
2 changes: 2 additions & 0 deletions misc/bazel/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_shell//shell:sh_library.bzl", "sh_library")

sh_library(
name = "sh_runfiles",
srcs = ["runfiles.sh"],
Expand Down
2 changes: 2 additions & 0 deletions misc/codegen/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary")

py_binary(
name = "codegen",
srcs = ["codegen.py"],
Expand Down
2 changes: 2 additions & 0 deletions misc/codegen/generators/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

py_library(
name = "generators",
srcs = glob(["*.py"]),
Expand Down
1 change: 1 addition & 0 deletions misc/codegen/lib/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@codegen_deps//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")

py_library(
name = "lib",
Expand Down
1 change: 1 addition & 0 deletions misc/codegen/loaders/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@codegen_deps//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")

py_library(
name = "loaders",
Expand Down
1 change: 1 addition & 0 deletions misc/codegen/test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@codegen_deps//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library", "py_test")

py_library(
name = "utils",
Expand Down
2 changes: 2 additions & 0 deletions misc/ripunzip/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

alias(
name = "ripunzip",
actual = select({"@platforms//os:" + os: "@ripunzip-" + os for os in ("linux", "windows", "macos")}),
Expand Down
1 change: 1 addition & 0 deletions python/extractor/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_python//python:defs.bzl", "py_binary")
load("//misc/bazel:pkg.bzl", "codeql_pkg_files", "strip_prefix")

py_binary(
Expand Down
1 change: 1 addition & 0 deletions rust/codegen/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

_args = [
"//rust/ast-generator",
Expand Down
1 change: 1 addition & 0 deletions swift/extractor/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load("//misc/bazel:pkg.bzl", "codeql_pkg_runfiles")
load("//swift:rules.bzl", "swift_cc_binary")

Expand Down
1 change: 1 addition & 0 deletions swift/logging/tests/assertion-diagnostics/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_python//python:defs.bzl", "py_test")
load("//swift:rules.bzl", "swift_cc_binary")

swift_cc_binary(
Expand Down
2 changes: 2 additions & 0 deletions swift/ql/integration-tests/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")

py_library(
name = "utils",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions swift/swift-autobuilder/tests/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_test")

[
py_test(
name = test_dir + "-test",
Expand Down
2 changes: 2 additions & 0 deletions swift/third_party/resource-dir/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

alias(
name = "resource-dir",
actual = select({"@platforms//os:" + os: "@swift-resource-dir-" + os for os in ("linux", "macos")}),
Expand Down
1 change: 1 addition & 0 deletions swift/tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load("//misc/bazel:pkg.bzl", "codeql_pkg_files")

sh_binary(
Expand Down
2 changes: 2 additions & 0 deletions swift/tools/test/qltest/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library", "py_test")

py_library(
name = "utils",
srcs = ["utils.py"],
Expand Down

0 comments on commit 53ca508

Please sign in to comment.