Skip to content

Commit aebd839

Browse files
authored
Bump Bazel, Scalafmt, Guava, sbt, gRPC, proto-java (#1720)
Dependency version and documentation updates broken out from #1710. - Bazel: 7.5.0 => 7.6.0 - gRPC: 2.53.0 => 2.54.1 - Guava: 33.4.0-jre => 33.4.4-jre - Scalafmt: 3.9.2 => 3.9.4 - `com-google-protobuf:protobuf-java`: 4.30.0 => 4.30.1 - `org.scala-sbt:util-interface`: 1.10.10 => 1.10.11 The documentation updates include: - Minor editing updates and typo fixes - The new "Removal of `bind()` aliases for `twitter_scrooge` dependencies" section of `README.md` The Guava 33.4.4-jre update introduces a new dependency on `org.jspecify:jspecify:1.0.0`. 33.4.5-jre changes Guava to be a Java module, but that release currently has problems, so we're sticking with 34.4.4-jre until that 34.4.6-jre release. The Guava v33.4.1 release message contains all the details. - https://jspecify.dev/ - https://dev.java/learn/modules/intro/ - https://github.com/google/guava/releases/tag/v33.4.1
1 parent 11d3b32 commit aebd839

File tree

35 files changed

+353
-276
lines changed

35 files changed

+353
-276
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_7_5_0:
56+
test_coverage_linux_7_6_0:
5757
name: "./test_coverage"
5858
platform: ubuntu2004
59-
bazel: 7.5.0
59+
bazel: 7.6.0
6060
shell_commands:
6161
- "./test_coverage.sh"
62-
test_coverage_macos_7.5.0:
62+
test_coverage_macos_7.6.0:
6363
name: "./test_coverage"
6464
platform: macos
65-
bazel: 7.5.0
65+
bazel: 7.6.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: 7.5.0
96+
bazel: 7.6.0
9797
shell_commands:
9898
- "./test_examples.sh"
9999
cross_build_linux:
100100
name: "./test_cross_build"
101101
platform: ubuntu2004
102-
bazel: 7.5.0
102+
bazel: 7.6.0
103103
shell_commands:
104104
- "./test_cross_build.sh"
105105
lint_linux:

.bazelversion

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

.scalafmt.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.9.2"
1+
version = "3.9.4"
22
runner.dialect = scala213
33
align.openParenCallSite = false
44
align.openParenDefnSite = false

README.md

+62-14
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ load("@rules_scala//:scala_config.bzl", "scala_config")
126126
# scala_config(scala_version = "2.13.16")
127127
#
128128
# You may define your own custom toolchain using Maven artifact dependencies
129-
# configured by your `WORKSPACE` file, imported using external loader like
130-
# https://github.com/bazelbuild/rules_jvm_external.
129+
# configured by your `WORKSPACE` file, imported using an external loader like
130+
# https://github.com/bazelbuild/rules_jvm_external. See docs/scala_toolchain.md.
131131
scala_config()
132132

133133
load(
@@ -264,20 +264,26 @@ maximum available at the time of writing.
264264
- For the actual versions used by `rules_scala`, see
265265
[scala/deps.bzl](scala/deps.bzl).
266266

267-
- See [the configuration file][ci-config] for the exact Bazel versions verified
268-
with the continuous-integration builds.
269-
270-
[ci-config]: ./.bazelci/presubmit.yml
267+
- See [.bazelci/presubmit.yml](./.bazelci/presubmit.yml) for the exact Bazel
268+
versions verified by the continuous integration builds.
271269

272270
| Bazel/Dependency | `rules_scala` 7.x |
273271
| :-: | :-: |
274-
| Bazel versions using Bzlmod<br/>(Coming soon! See bazelbuild/rules_scala#1482.) | 7.5.0, 8.x,<br/>`rolling`, `last_green` |
275-
| Bazel versions using `WORKSPACE` | 6.5.0, 7.5.0, 8.x<br/>(see the [notes on 6.5.0 compatibility](#6.5.0)) |
276-
| `protobuf` | v30.0 |
277-
| `abseil-cpp` | 20250127.0 |
278-
| `rules_java` | 8.10.0 |
272+
| Bazel versions using Bzlmod<br/>(Coming soon! See bazelbuild/rules_scala#1482.) | 7.6.0, 8.x,<br/>`rolling`, `last_green` |
273+
| Bazel versions using `WORKSPACE` | 6.5.0, 7.6.0, 8.x<br/>(see the [notes on 6.5.0 compatibility](#6.5.0)) |
274+
| `protobuf` | v30.1 |
275+
| `rules_proto` | 7.1.0 |
276+
| `abseil-cpp` | 20250127.1 |
277+
| `rules_java` | 8.11.0 |
279278
| `ScalaPB` | 1.0.0-alpha.1 |
280279

280+
The next major release will likely drop support for `protobuf` versions before
281+
v29 and remove `rules_proto` completely. This is to comply with the guidance in
282+
[Protobuf News: News Announcements for Version 29.x](
283+
https://protobuf.dev/news/v29/). For more details, see this [comment from #1710
284+
explaining why rules_proto remains for now](
285+
https://github.com/bazelbuild/rules_scala/pull/1710#issuecomment-2750001012).
286+
281287
## Usage with [bazel-deps](https://github.com/johnynek/bazel-deps)
282288

283289
Bazel-deps allows you to generate bazel dependencies transitively for maven artifacts. Generally we don't want bazel-deps to fetch
@@ -682,7 +688,7 @@ Under Bzlmod, repos are only visible to the module extension that creates them,
682688
unless the `MODULE.bazel` file brings them into scope with
683689
[`use_repo()`](https://bazel.build/rules/lib/globals/module#use_repo). This can
684690
lead to errors like those from the following example, which [originally called
685-
`setup_scala_toolchain()` under Bzlmod](
691+
'setup_scala_toolchain()' under Bzlmod](
686692
https://github.com/michalbogacz/scala-bazel-monorepo/blob/17f0890a4345529e09b9ce83bcb2e3d15687c522/BUILD.bazel):
687693

688694
```py
@@ -756,7 +762,7 @@ bazelbuild/bazel#25198 describes how the semantics of some instances of
756762
`$(rootpath)` fixed them.
757763

758764
The good news is that replacing such instances `$(location)` with `$(rootpath)`
759-
is backwards compatible to Bazel 6.5.0 and 7.5.0. Updating them now will ensure
765+
is backwards compatible to Bazel 6.5.0 and 7.6.0. Updating them now will ensure
760766
future compatibility.
761767

762768
### <a id="6.5.0"></a>Limited Bazel 6.5.0 compatibility
@@ -809,10 +815,52 @@ https://github.com/scalapb/ScalaPB/releases/tag/v1.0.0-alpha.1), we had to
809815
remove the Scala 2.11 test cases.
810816

811817
Building `scala_proto` for Scala 2.11 requires [building with Bazel 6.5.0
812-
under `WORKSPACE`](#6.5.0), with the maximum dependency versions specified in
818+
under WORKSPACE](#6.5.0), with the maximum dependency versions specified in
813819
that section. While this may continue to work for some time, it is not
814820
officially supported.
815821

822+
### Removal of `bind()` aliases for `twitter_scrooge` dependencies
823+
824+
`rules_scala` 7.x removes all of the obsolete [`bind()`][] aliases under
825+
`//external:io_bazel_rules_scala/dependency/` created for `twitter_scrooge`
826+
toolchain dependencies. If your project happens to depend on these aliases, you
827+
can replace them with the following repository references:
828+
829+
| `bind()` alias under `//external:io_bazel_rules_scala/dependency/` | Repository reference |
830+
| :-- | :-- |
831+
| `scala/guava` | `@io_bazel_rules_scala_guava` |
832+
| `thrift/javax_annotation_api` | `@io_bazel_rules_scala_javax_annotation_api` |
833+
| `thrift/libthrift` | `@libthrift` |
834+
| `thrift/mustache` | `@io_bazel_rules_scala_mustache` |
835+
| `thrift/scopt` | `@io_bazel_rules_scala_scopt` |
836+
| `thrift/scrooge_core` | `@io_bazel_rules_scala_scrooge_core` |
837+
| `thrift/scrooge_generator` | `@io_bazel_rules_scala_scrooge_generator` |
838+
| `thrift/util_core` | `@io_bazel_rules_scala_util_core` |
839+
| `thrift/util_logging` | `@io_bazel_rules_scala_util_logging` |
840+
841+
[`bind()`]: https://bazel.build/reference/be/workspace#bind
842+
843+
To access these repositories under Bzlmod, you'll need to add the following to
844+
your `MODULE.bazel` file:
845+
846+
```py
847+
scala_deps.toolchains(
848+
twitter_scrooge = True,
849+
)
850+
use_repo(
851+
scala_deps,
852+
"io_bazel_rules_scala_guava",
853+
"io_bazel_rules_scala_javax_annotation_api",
854+
"io_bazel_rules_scala_mustache",
855+
"io_bazel_rules_scala_scopt",
856+
"io_bazel_rules_scala_scrooge_core",
857+
"io_bazel_rules_scala_scrooge_generator",
858+
"io_bazel_rules_scala_util_core",
859+
"io_bazel_rules_scala_util_logging",
860+
"libthrift",
861+
)
862+
```
863+
816864
### Bazel module compatibility levels
817865

818866
`rules_scala` 7.0.0 will set the

docs/scala_toolchain.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ scala_toolchains()
2525
scala_register_toolchains()
2626
```
2727

28-
### B) Defining your own `scala_toolchain` requires 2 steps
28+
### B) Defining your own `scala_toolchain`
2929

3030
#### Step 1
3131

@@ -57,15 +57,15 @@ toolchain(
5757

5858
If you want to use your own compiler JARs, use `setup_scala_toolchain()`
5959
instead. This example assumes the external libraries are resolved with
60-
[rules_jvm_external](https://github.com/bazelbuild/rules_jvm_external)
60+
[rules_jvm_external](https://github.com/bazelbuild/rules_jvm_external):
6161

6262
```py
6363
# //toolchains/BUILD
6464
load("@rules_scala//scala:scala.bzl", "setup_scala_toolchain")
6565

6666
setup_scala_toolchain(
6767
name = "my_toolchain",
68-
# configure toolchain dependecies
68+
# configure toolchain dependencies
6969
parser_combinators_deps = [
7070
"@maven//:org_scala_lang_modules_scala_parser_combinators_2_12",
7171
],
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.5.0
1+
7.6.0
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.5.0
1+
7.6.0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.5.0
1+
7.6.0

examples/crossbuild/.bazelversion

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

examples/scala3/.bazelversion

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

examples/semanticdb/.bazelversion

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

scala_proto/default/default_deps.bzl

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ DEFAULT_SCALAPB_COMPILE_DEPS = [
3131

3232
DEFAULT_SCALAPB_GRPC_DEPS = [
3333
"@io_bazel_rules_scala_guava",
34+
"@org_jspecify_jspecify",
3435
"@scala_proto_rules_disruptor",
3536
"@scala_proto_rules_grpc_api",
3637
"@scala_proto_rules_grpc_context",

scala_proto/default/repositories.bzl

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ GUAVA_ARTIFACT_IDS = [
1515
"io_bazel_rules_scala_guava",
1616
"io_bazel_rules_scala_failureaccess",
1717
"org_checkerframework_checker_qual",
18+
"org_jspecify_jspecify",
1819
]
1920

2021
def scala_proto_artifact_ids(scala_version):

scripts/create_repository.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
]
2828
PARSER_COMBINATORS_VERSION = '1.1.2'
2929
SBT_COMPILER_INTERFACE_VERSION = '1.10.8'
30-
SBT_UTIL_INTERFACE_VERSION = '1.10.10'
30+
SBT_UTIL_INTERFACE_VERSION = '1.10.11'
3131
SCALATEST_VERSION = "3.2.19"
32-
SCALAFMT_VERSION = "3.9.2"
32+
SCALAFMT_VERSION = "3.9.4"
3333
KIND_PROJECTOR_VERSION = "0.13.3"
34-
PROTOBUF_JAVA_VERSION = "4.30.0"
34+
PROTOBUF_JAVA_VERSION = "4.30.1"
3535
JLINE_VERSION = '3.29.0'
3636
SCALAPB_VERSION = '0.11.17'
3737
PROTOC_BRIDGE_VERSION = '0.9.8'
3838
GRPC_VERSION = '1.71.0'
39-
GRPC_COMMON_PROTOS_VERSION = '2.53.0'
39+
GRPC_COMMON_PROTOS_VERSION = '2.54.1'
4040
GRPC_LIBS = ['netty', 'protobuf', 'stub']
41-
GUAVA_VERSION = '33.4.0-jre'
41+
GUAVA_VERSION = '33.4.4-jre'
4242

4343
# This should include values corresponding to `MavenCoordinates.artifact_name`,
4444
# i.e., group:artifact after stripping any Scala version suffix from artifact.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.5.0
1+
7.6.0

test/scalafmt/.scalafmt.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.9.2"
1+
version = "3.9.4"
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-
7.5.0
1+
7.6.0
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.9.2"
1+
version = "3.9.4"
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.2"
1+
version = "3.9.4"
22
runner.dialect = scala3
33
maxColumn = 40
44
lineEndings = preserve

third_party/repositories/scala_2_11.bzl

+11-8
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.30.0",
71-
"sha256": "3e9ec992a1bd02eeec7229879e5e99798c0f582a3cbfc924792640256e87b67d",
70+
"artifact": "com.google.protobuf:protobuf-java:4.30.1",
71+
"sha256": "ff666fc33646eb2b609259b7928fc675782e401ee6e39ef3ae4581e06f642a15",
7272
},
7373
"com_lihaoyi_fansi": {
7474
"artifact": "com.lihaoyi:fansi_2.11:0.2.6",
@@ -115,14 +115,13 @@ artifacts = {
115115
"sha256": "8a8f81cf9b359e3f6dfa691a1e776985c061ef2f223c9b2c80753e1b458e8064",
116116
},
117117
"io_bazel_rules_scala_guava": {
118-
"artifact": "com.google.guava:guava:33.4.0-jre",
119-
"sha256": "b918c98a7e44dbe94ebd9fe3e40cddaadb5a93e6a78eb6008b42df237241e538",
118+
"artifact": "com.google.guava:guava:33.4.4-jre",
119+
"sha256": "95bde613be18dfa2f0b870e4029ac264d5ba6989967204fc92ffe9ad5370cf5e",
120120
"deps": [
121-
"@com_google_code_findbugs_jsr305",
122121
"@com_google_errorprone_error_prone_annotations",
123122
"@com_google_j2objc_j2objc_annotations",
124123
"@io_bazel_rules_scala_failureaccess",
125-
"@org_checkerframework_checker_qual",
124+
"@org_jspecify_jspecify",
126125
],
127126
},
128127
"io_bazel_rules_scala_javax_annotation_api": {
@@ -424,6 +423,10 @@ artifacts = {
424423
"artifact": "org.codehaus.mojo:animal-sniffer-annotations:1.24",
425424
"sha256": "c720e6e5bcbe6b2f48ded75a47bccdb763eede79d14330102e0d352e3d89ed92",
426425
},
426+
"org_jspecify_jspecify": {
427+
"artifact": "org.jspecify:jspecify:1.0.0",
428+
"sha256": "1fad6e6be7557781e4d33729d49ae1cdc8fdda6fe477bb0cc68ce351eafdfbab",
429+
},
427430
"org_scala_lang_modules_scala_collection_compat": {
428431
"artifact": "org.scala-lang.modules:scala-collection-compat_2.11:2.1.2",
429432
"sha256": "e9667b8b7276aeb42599f536fe4d7caab06eabc55e9995572267ad60c7a11c8b",
@@ -779,8 +782,8 @@ artifacts = {
779782
"sha256": "c7b478503ec524e55df19b424d46d27c8a68aeb801664fadd4f069b71f52d0f6",
780783
},
781784
"scala_proto_rules_proto_google_common_protos": {
782-
"artifact": "com.google.api.grpc:proto-google-common-protos:2.53.0",
783-
"sha256": "61ac7fbd31a9f604890d22330a6f94b3f410ea2d7247e0f5f11a87ae34087385",
785+
"artifact": "com.google.api.grpc:proto-google-common-protos:2.54.1",
786+
"sha256": "2fcff25fe8a90fcacb146a900222c497ba0a9a531271e6b135a76450d23b1ef2",
784787
"deps": [
785788
"@com_google_protobuf_protobuf_java",
786789
],

0 commit comments

Comments
 (0)