Skip to content

Commit 8cef613

Browse files
authored
Bump dependency versions, drop compatibility_level (#1815)
Removes `compatibility_level` from the `module` directive in `MODULE.bazel`. Bumps the following dependency versions: Bazel modules: - `bazel_features`: 1.38.0 => 1.42.0 - `bazel_skylib`: 1.8.2 => 1.9.0 - `protobuf`: v33.4 => v33.5 - `rules_cc`: 0.2.14 => 0.2.17 - `rules_go`: 0.59.0 => 0.60.0 - `rules_java`: 9.3.0 => 9.6.1 - `rules_python`: 1.7.0 => 1.8.5 Golang: - Golang: 1.25.5 => 1.26.0 - `golang.org/x/tools`: v0.40.0 => v0.42.2 Maven artifacts: - `org.scalameta:scalafmt-core_*`: 3.10.2 => 3.10.7 - `org.scala-sbt:compiler-interface`: 1.11.0 => 1.12.0 - `org.scala-sbt:util-interface`: 1.11.7 => 1.12.4 - `org.google.protobuf:protobuf-java`: 4.33.4 => 4.33.5 - `io.grpc:grpc-*`: 1.77.0 => 1.79.0 - `com.google.api.grpc:proto-google-common-protos`: 2.63.1 => 2.66.0 --- Most of the change is a routine dependency version bump before a new patch level release. There are two specific changes of note. First, Bazel 8.6.0 and 9.1.0 effectively make the `compatibility_level` attribute of the `module` directive a no-op per bazelbuild/bazel#28600. Second, though `protobuf` v34.0 is out, we only update to v35.5 because v40.0 drops support for Bazel 7 (in maintenance mode until December 2026): - https://github.com/protocolbuffers/protobuf/releases/tag/v34.0 - protocolbuffers/protobuf@304c9ba - https://protobuf.dev/support/migration/#dropped-bazel-7-support - https://bazel.build/release I'll confer with the Bazel Rules Author SIG on 2026-03-03 regarding whether or not we should begin planning to deprecate Bazel 7 support. Doing so would likely necessitate a major version bump to `rules_scala` 8.0.0. (It would be good to get some other large pending changes in before then, notably the possible `rules_jvm_external` migration.)
1 parent 626a80f commit 8cef613

36 files changed

Lines changed: 1169 additions & 1060 deletions

File tree

.scalafmt.conf

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

MODULE.bazel

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module(
77
# - https://github.com/bazel-contrib/publish-to-bcr/blob/v1.1.0/src/domain/create-entry.ts#L176-L216
88
version = "",
99
bazel_compatibility = [">=7.1.0"],
10-
compatibility_level = 7,
1110
)
1211

1312
SCALA_VERSION = "2.12.21"
@@ -34,7 +33,7 @@ SCALA_VERSIONS = SCALA_2_VERSIONS + SCALA_3_VERSIONS
3433
bazel_dep(name = "bazel_skylib", version = "1.8.0")
3534
single_version_override(
3635
module_name = "bazel_skylib",
37-
version = "1.8.2",
36+
version = "1.9.0",
3837
)
3938

4039
bazel_dep(name = "platforms", version = "0.0.9")
@@ -46,7 +45,7 @@ single_version_override(
4645
bazel_dep(name = "rules_java", version = "7.6.0")
4746
single_version_override(
4847
module_name = "rules_java",
49-
version = "9.3.0",
48+
version = "9.6.1",
5049
)
5150

5251
# TODO: Remove this dep once protobuf 33.4 becomes the minimum supported
@@ -60,7 +59,7 @@ bazel_dep(
6059
)
6160
single_version_override(
6261
module_name = "protobuf",
63-
version = "33.4",
62+
version = "33.5",
6463
)
6564

6665
# See //src/java/io/bazel/rulesscala/worker:worker_protocol_java_proto.
@@ -245,7 +244,7 @@ bazel_dep(
245244
)
246245
bazel_dep(
247246
name = "rules_go",
248-
version = "0.59.0",
247+
version = "0.60.0",
249248
dev_dependency = True,
250249
repo_name = "io_bazel_rules_go", # for com_github_bazelbuild_buildtools
251250
)
@@ -256,7 +255,7 @@ go_sdk = use_extension(
256255
"go_sdk",
257256
dev_dependency = True,
258257
)
259-
go_sdk.download(version = "1.25.5")
258+
go_sdk.download(version = "1.26.0")
260259

261260
go_deps = use_extension(
262261
"@gazelle//:extensions.bzl",
@@ -275,11 +274,11 @@ go_deps = use_extension(
275274
# - https://go.dev/ref/mod#checksum-database
276275
#
277276
# go list -m golang.org/x/tools@latest
278-
# curl https://sum.golang.org/lookup/golang.org/x/tools@v0.38.0
277+
# curl https://sum.golang.org/lookup/golang.org/x/tools@v0.42.0
279278
go_deps.module(
280279
path = "golang.org/x/tools",
281-
sum = "h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA=",
282-
version = "v0.40.0",
280+
sum = "h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k=",
281+
version = "v0.42.0",
283282
)
284283
go_deps.module(
285284
path = "github.com/golang/protobuf",
@@ -292,5 +291,5 @@ use_repo(
292291
"org_golang_x_tools",
293292
)
294293

295-
bazel_dep(name = "rules_python", version = "1.7.0", dev_dependency = True)
294+
bazel_dep(name = "rules_python", version = "1.8.5", dev_dependency = True)
296295
bazel_dep(name = "rules_shell", version = "0.6.1", dev_dependency = True)

MODULE.bazel.lock

Lines changed: 26 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,31 +1547,6 @@ use_repo(
15471547
)
15481548
```
15491549

1550-
### Bazel module compatibility levels
1551-
1552-
`rules_scala` 7.0.0 will set the
1553-
[`compatibility_level`](https://bazel.build/external/module#compatibility_level)
1554-
value for its [`module()`](https://bazel.build/rules/lib/globals/module)
1555-
directive. The `compatibility_level` for `rules_scala` will track major version
1556-
numbers (per [semantic versioning](https://semver.org/)), and this `README` will
1557-
clearly document the reason for the level bump. `compatibility_level` mismatches
1558-
in the module graph will cause module resolution to fail, signaling the presence
1559-
of known breaking changes.
1560-
1561-
The concept of proper `compatibility_level` usage is still up for discussion in
1562-
bazelbuild/bazel#24302. However, the policy above favors forcing module
1563-
resolution to fail, rather than allowing a later execution step to fail with a
1564-
potentially confusing error message. If a version bump may break builds for any
1565-
known reason, we will explain why up front instead of waiting for users to be
1566-
surprised.
1567-
1568-
[A comment from #1647 illustrates how 'rules_erlang' fails due to
1569-
'compatibility_level' conflicts][erlang]. The ['rules_erlang' 3.0.0 release
1570-
notes](https://github.com/rabbitmq/rules_erlang/releases/tag/3.0.0) describe the
1571-
breaking changes. This seems like a reasonable model to follow.
1572-
1573-
[erlang]: https://github.com/bazelbuild/rules_scala/issues/1647#issuecomment-2486777859
1574-
15751550
## Contributing
15761551

15771552
See [CONTRIBUTING.md](CONTRIBUTING.md) for more info.

deps/latest/MODULE.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ module(
66
bazel_compatibility = [">=7.1.0"],
77
)
88

9-
bazel_dep(name = "bazel_skylib", version = "1.8.2")
9+
bazel_dep(name = "bazel_skylib", version = "1.9.0")
1010
bazel_dep(name = "platforms", version = "1.0.0")
11-
bazel_dep(name = "protobuf", version = "33.4")
12-
bazel_dep(name = "rules_java", version = "9.3.0")
11+
bazel_dep(name = "protobuf", version = "33.5")
12+
bazel_dep(name = "rules_java", version = "9.6.1")
1313
bazel_dep(name = "rules_proto", version = "7.1.0")
1414

1515
# https://github.com/bazelbuild/bazel/pull/25681 removed
1616
# `bazel_tools/tools/cpp/osx_cc_wrapper.sh.tpl` in the `last_green` Bazel as of
1717
# 2025-04-08. At least `test_cross_build` breaks without this.
18-
bazel_dep(name = "rules_cc", version = "0.2.14")
18+
bazel_dep(name = "rules_cc", version = "0.2.17")

0 commit comments

Comments
 (0)