Skip to content

Commit bfc9495

Browse files
authored
Bazel 7 and MSVC compatible version updates (#1711)
* Bazel 7 and MSVC compatible version updates Dependency version updates that still work with Bazel 6.5.0 and 7.5.0. Broken out from #1710, and part of #1482 and #1652. Updates `.bazelversion` files to 7.5.0 and the CI builds in `.bazelci/presubmit.yml` to use Bazel 7.5.0. Bumps the following dependencies, which should not cause build breakages on Windows + MSVC: - Go: 1.24.0 => 1.24.1 - Scalafmt: 3.9.1 => 3.9.2 - `abseil-cpp`: 20220623.1 => 20250127.0 - `grpc`: 1.70.0 => 1.71.1 - `protobuf-java`: 4.29.3 => 4.30.0 - `sbt-compiler-interface`: 1.10.7 => 1.10.8 - `sbt-compiler-util`: 1.10.7 => 1.10.10 - `google-common-protos`: 2.52.0 => 2.53.0 Defers the following updates, which are already present in #1710: - `protobuf`: v21.7 => v28.3 (or v30.0) - `rules_cc`: 0.0.9 => 0.1.1 - `rules_proto`: 6.0.2 => 7.1.0 - `rules_python`: 0.38.0 => 1.2.0 - `scalapb`: 0.11.17 => 1.0.0-alpha1 These deferred updates all need to happen together, as updating only a subset of them will break the build. This change is smaller and more focused than #1710, and should ultimately make that pull request smaller and/or easier to review. * Add `abseil-cpp` repo mapping to `protobuf` This will make sure `protobuf` uses the version of `abseil-cpp` that we import. * Set `common --enable_workspace --noenable_bzlmod` These flags affect `bazel query`, and Bazel 8 defaults to `--noenable_workspace --enable_bzlmod`. Using `common` ensures `bazel query` sees the same settings as `bazel build`. This prevents the `WORKSPACE` run of `test_semanticdb_handles_removed_sourcefiles` from failing under Bazel 8. Bazel 6.5.0 doesn't define `--[no]enable_workspace`, so it makes sense to include it in the change that sets all `.bazelversion` files to 7.5.0.
1 parent 1c2a792 commit bfc9495

File tree

34 files changed

+311
-311
lines changed

34 files changed

+311
-311
lines changed

.bazelci/presubmit.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ tasks:
5353
- "set PATH=/usr/bin;%PATH%" #Make sure bash uses msys commands over windows commands. (i.e. find).
5454
- "bash -lc \"pacman --noconfirm --needed -S libxml2\"" #tests require xmllint
5555
- "bash test_rules_scala.sh"
56-
test_coverage_linux_6_5_0:
56+
test_coverage_linux_7_5_0:
5757
name: "./test_coverage"
5858
platform: ubuntu2004
59-
bazel: 6.5.0
59+
bazel: 7.5.0
6060
shell_commands:
6161
- "./test_coverage.sh"
62-
test_coverage_macos_6.5.0:
62+
test_coverage_macos_7.5.0:
6363
name: "./test_coverage"
6464
platform: macos
65-
bazel: 6.5.0
65+
bazel: 7.5.0
6666
shell_commands:
6767
- "./test_coverage.sh"
6868
test_reproducibility_linux:
@@ -93,13 +93,13 @@ tasks:
9393
examples_linux:
9494
name: "./test_examples"
9595
platform: ubuntu2004
96-
bazel: 6.5.0
96+
bazel: 7.5.0
9797
shell_commands:
9898
- "./test_examples.sh"
9999
cross_build_linux:
100100
name: "./test_cross_build"
101101
platform: ubuntu2004
102-
bazel: 6.5.0
102+
bazel: 7.5.0
103103
shell_commands:
104104
- "./test_cross_build.sh"
105105
lint_linux:

.bazelrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ build --enable_platform_specific_config
44

55
build:windows --worker_quit_after_build --enable_runfiles
66

7-
# Remove upon completing Bzlmod compatibility work.
8-
# - https://github.com/bazelbuild/rules_scala/issues/1482
9-
build --noenable_bzlmod
7+
# Switch to --noenable_workspace when Bzlmod lands.
8+
# https://github.com/bazelbuild/rules_scala/issues/1482
9+
common --enable_workspace --noenable_bzlmod

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.9.1"
1+
version = "3.9.2"
22
runner.dialect = scala213
33
align.openParenCallSite = false
44
align.openParenDefnSite = false

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ load(
103103

104104
go_rules_dependencies()
105105

106-
go_register_toolchains(version = "1.24.0")
106+
go_register_toolchains(version = "1.24.1")
107107

108108
http_archive(
109109
name = "bazelci_rules",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

examples/crossbuild/.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

examples/scala3/.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

0 commit comments

Comments
 (0)