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

+6-6
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

+3-3
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

.scalafmt.conf

+1-1
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

+1-1
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",
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

examples/crossbuild/.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

examples/scala3/.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

examples/semanticdb/.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

scala/deps.bzl

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ def rules_scala_dependencies():
2323
strip_prefix = "rules_cc-0.0.9",
2424
)
2525

26-
# Needed by protobuf-21.7 and Bazel 6.5.0, as later versions require C++14.
2726
maybe(
2827
http_archive,
29-
name = "com_google_absl",
30-
sha256 = "91ac87d30cc6d79f9ab974c51874a704de9c2647c40f6932597329a282217ba8",
31-
strip_prefix = "abseil-cpp-20220623.1",
32-
url = "https://github.com./abseil/abseil-cpp/archive/refs/tags/20220623.1.tar.gz",
28+
name = "abseil-cpp",
29+
sha256 = "16242f394245627e508ec6bb296b433c90f8d914f73b9c026fddb905e27276e8",
30+
strip_prefix = "abseil-cpp-20250127.0",
31+
url = "https://github.com./abseil/abseil-cpp/archive/refs/tags/20250127.0.tar.gz",
3332
)
3433

3534
maybe(
@@ -47,6 +46,7 @@ def rules_scala_dependencies():
4746
sha256 = "75be42bd736f4df6d702a0e4e4d30de9ee40eac024c4b845d17ae4cc831fe4ae",
4847
strip_prefix = "protobuf-21.7",
4948
url = "https://github.com./protocolbuffers/protobuf/archive/refs/tags/v21.7.tar.gz",
49+
repo_mapping = {"@com_google_absl": "@abseil-cpp"},
5050
)
5151

5252
maybe(

scripts/create_repository.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
"3.6.4"
2727
]
2828
PARSER_COMBINATORS_VERSION = '1.1.2'
29-
SBT_COMPILER_INTERFACE_VERSION = '1.10.7'
30-
SBT_UTIL_INTERFACE_VERSION = '1.10.7'
29+
SBT_COMPILER_INTERFACE_VERSION = '1.10.8'
30+
SBT_UTIL_INTERFACE_VERSION = '1.10.10'
3131
SCALATEST_VERSION = "3.2.19"
32-
SCALAFMT_VERSION = "3.9.1"
32+
SCALAFMT_VERSION = "3.9.2"
3333
KIND_PROJECTOR_VERSION = "0.13.3"
34-
PROTOBUF_JAVA_VERSION = "4.29.3"
34+
PROTOBUF_JAVA_VERSION = "4.30.0"
3535
JLINE_VERSION = '3.29.0'
3636
SCALAPB_VERSION = '0.11.17'
3737
PROTOC_BRIDGE_VERSION = '0.9.8'
38-
GRPC_VERSION = '1.70.0'
39-
GRPC_COMMON_PROTOS_VERSION = '2.52.0'
38+
GRPC_VERSION = '1.71.0'
39+
GRPC_COMMON_PROTOS_VERSION = '2.53.0'
4040
GRPC_LIBS = ['netty', 'protobuf', 'stub']
4141
GUAVA_VERSION = '33.4.0-jre'
4242

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0

test/scalafmt/.scalafmt.conf

+1-1
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
maxColumn = 40
44
lineEndings = preserve

test_cross_build/.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.5.0
+1-1
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
maxColumn = 40
44
lineEndings = preserve
+1-1
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 = scala3
33
maxColumn = 40
44
lineEndings = preserve

third_party/repositories/scala_2_11.bzl

+20-20
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ artifacts = {
6767
"sha256": "88241573467ddca44ffd4d74aa04c2bbfd11bf7c17e0c342c94c9de7a70a7c64",
6868
},
6969
"com_google_protobuf_protobuf_java": {
70-
"artifact": "com.google.protobuf:protobuf-java:4.29.3",
71-
"sha256": "442db5991a11974d72127353be7d7e7abdf8d943d83b16668cb2e336d7392f54",
70+
"artifact": "com.google.protobuf:protobuf-java:4.30.0",
71+
"sha256": "3e9ec992a1bd02eeec7229879e5e99798c0f582a3cbfc924792640256e87b67d",
7272
},
7373
"com_lihaoyi_fansi": {
7474
"artifact": "com.lihaoyi:fansi_2.11:0.2.6",
@@ -566,24 +566,24 @@ artifacts = {
566566
"sha256": "f412ecbb235c2460b45e63584109723dea8d94b819c78c9bfc38f50cba8546c0",
567567
},
568568
"scala_proto_rules_grpc_api": {
569-
"artifact": "io.grpc:grpc-api:1.70.0",
570-
"sha256": "45faf2ac1bf2791e8fdabce53684a86b62c99b84cba26fb13a5ba3f4abf80d6c",
569+
"artifact": "io.grpc:grpc-api:1.71.0",
570+
"sha256": "49771bad244de122f05780c12f3e74ba9a301be125d0941a85e649212f4a8a01",
571571
"deps": [
572572
"@com_google_code_findbugs_jsr305",
573573
"@com_google_errorprone_error_prone_annotations",
574574
"@io_bazel_rules_scala_guava",
575575
],
576576
},
577577
"scala_proto_rules_grpc_context": {
578-
"artifact": "io.grpc:grpc-context:1.70.0",
579-
"sha256": "eb2824831c0ac03e741efda86b141aa863a481ebc4aaf5a5c1f13a481dbb40ff",
578+
"artifact": "io.grpc:grpc-context:1.71.0",
579+
"sha256": "dd0484ac5d0baf7ee810331504dc6202c7b426bc88dce24100e77f576904dd52",
580580
"deps": [
581581
"@scala_proto_rules_grpc_api",
582582
],
583583
},
584584
"scala_proto_rules_grpc_core": {
585-
"artifact": "io.grpc:grpc-core:1.70.0",
586-
"sha256": "c2b5576b8b363b1b1006673c492d912500baaa1581430a7f9c05e82cc5bdfba4",
585+
"artifact": "io.grpc:grpc-core:1.71.0",
586+
"sha256": "03099494c60cb9fea5802ebba8d767e44697062ec05e5207b5ae897e09bd38e9",
587587
"deps": [
588588
"@com_google_android_annotations",
589589
"@com_google_code_gson_gson",
@@ -596,8 +596,8 @@ artifacts = {
596596
],
597597
},
598598
"scala_proto_rules_grpc_netty": {
599-
"artifact": "io.grpc:grpc-netty:1.70.0",
600-
"sha256": "466bc29f36bb3b33ba6fa044d17cdfac494e5715ff606e1794541d0b90b42c16",
599+
"artifact": "io.grpc:grpc-netty:1.71.0",
600+
"sha256": "dc45a8d584b9994645470f7e3543238a8618c67ea3cfa03089d2a67ea1a4ddf1",
601601
"deps": [
602602
"@com_google_errorprone_error_prone_annotations",
603603
"@io_bazel_rules_scala_guava",
@@ -612,8 +612,8 @@ artifacts = {
612612
],
613613
},
614614
"scala_proto_rules_grpc_protobuf": {
615-
"artifact": "io.grpc:grpc-protobuf:1.70.0",
616-
"sha256": "9b98039ed826604c46d6ac8f8a182d413d348ec6abe26467736b05aa92e7e1d3",
615+
"artifact": "io.grpc:grpc-protobuf:1.71.0",
616+
"sha256": "7eba0625fba8e176c0fc1b80610fc2c52c036d95805ffdd3f6985a51c968de94",
617617
"deps": [
618618
"@com_google_code_findbugs_jsr305",
619619
"@com_google_protobuf_protobuf_java",
@@ -624,17 +624,17 @@ artifacts = {
624624
],
625625
},
626626
"scala_proto_rules_grpc_protobuf_lite": {
627-
"artifact": "io.grpc:grpc-protobuf-lite:1.70.0",
628-
"sha256": "e7cc2ca8981672851cbebf83a24bfb93c1b2b058e75c1a817a757b914f33403d",
627+
"artifact": "io.grpc:grpc-protobuf-lite:1.71.0",
628+
"sha256": "ffad977400b49649fa2d5404abaadfca66c7e5956974f192411e8946a12e5f53",
629629
"deps": [
630630
"@com_google_code_findbugs_jsr305",
631631
"@io_bazel_rules_scala_guava",
632632
"@scala_proto_rules_grpc_api",
633633
],
634634
},
635635
"scala_proto_rules_grpc_stub": {
636-
"artifact": "io.grpc:grpc-stub:1.70.0",
637-
"sha256": "5adaa1ec1f744b67ae14a8dbc39c9589c010fad0fd557b0a02966202e4d23a18",
636+
"artifact": "io.grpc:grpc-stub:1.71.0",
637+
"sha256": "51912e612b28db65eec0332a8be494b3c54d347ecd2c5f6a7fdd2cb994fab360",
638638
"deps": [
639639
"@com_google_errorprone_error_prone_annotations",
640640
"@io_bazel_rules_scala_guava",
@@ -643,8 +643,8 @@ artifacts = {
643643
],
644644
},
645645
"scala_proto_rules_grpc_util": {
646-
"artifact": "io.grpc:grpc-util:1.70.0",
647-
"sha256": "683aff93d2cabc44ff21dc9ab7794f8ae7b4c65d18748c8474535311eabe8dc4",
646+
"artifact": "io.grpc:grpc-util:1.71.0",
647+
"sha256": "32a9197c541bb072dc2f728e235347c3c0f7cf8062abf3de58c50b4fc70f31b1",
648648
"deps": [
649649
"@io_bazel_rules_scala_guava",
650650
"@org_codehaus_mojo_animal_sniffer_annotations",
@@ -779,8 +779,8 @@ artifacts = {
779779
"sha256": "c7b478503ec524e55df19b424d46d27c8a68aeb801664fadd4f069b71f52d0f6",
780780
},
781781
"scala_proto_rules_proto_google_common_protos": {
782-
"artifact": "com.google.api.grpc:proto-google-common-protos:2.52.0",
783-
"sha256": "425c5a015b661e583d8b28ebf4fc443eed160835bc93041b9aa97bcd947ab5c5",
782+
"artifact": "com.google.api.grpc:proto-google-common-protos:2.53.0",
783+
"sha256": "61ac7fbd31a9f604890d22330a6f94b3f410ea2d7247e0f5f11a87ae34087385",
784784
"deps": [
785785
"@com_google_protobuf_protobuf_java",
786786
],

0 commit comments

Comments
 (0)