Skip to content

Commit 05ecd67

Browse files
authored
Bump dependencies, update release_prep.sh, docs (bazel-contrib#1745)
* Bump dependencies, update `release_prep.sh`, docs Updates a few dependencies, enables `release_prep.sh` to handle tags with or without a `v` prefix, and updates `//specs2:specs2` for `rules_java` 8.12.0. Fixes bazel-contrib#1741. - Go: 1.24.2 => 1.24.3 - `google-common-protos`: 2.55.3 => 2.57.0 - `jline`: 3.29.0 => 3.30.3 - `protobuf`: 30.2 => 31.0 - `protobuf-java`: 4.30.2 => 4.31.0 - `rules_go`: 0.54.0 => 0.54.1 - `rules_java`: 8.11.0 => 8.12.0 - `rules_python`: 1.4.0 => 1.4.1 - `util-interface`: 1.10.11 => 1.11.0 Also: - Touches up `test_reproducibility.sh` slightly and fixes documentation errors pointed out privately by @gergelyfabian. - Updates `test_scala_import_source_jar.sh` to use `bazel query` via the new `target_file_location` helper to get the srcjar path. - Renames `_print_error_msg` to `fail` in `test_helper.sh` and updates it to return nonzero. - Adds `bazel_features_deps()` to `WORKSPACE` and a commented out `--repositories_without_autoloads` line to `.bazelrc` for `rules_java` 8.12.0 `WORKSPACE` builds. --- This is to keep dependencies up to date with the latest versions. Updating `test_scala_import_source_jar.sh` to use `bazel query` became necessary because: - Switching from running under Bzlmod to running under `WORKSPACE` would break. - Removing the repo to force it to regenerate caused `last_green` Bazel runs to break. This wouldn't only break this test, but it broke _all_ tests until running `bazel clean --expunge`. `last_green` Bazel seems to hold onto state, even across `bazel shutdown`, such that it doesn't notice that it needs to regenerate a deleted repo. * Bump grpc, jline, platforms, protobuf{,-java} - `grpc`: 1.72.0 => 1.73.0 - `jline`: 3.30.3 => 3.30.4 - `platforms`: 0.0.11 => 1.0.0 - `protobuf`: 31.0 => 31.1 - `protobuf-java`: 4.31.0 => 4.31.1 * Bump Scalafmt to 3.9.7 * Bump Go, rules_go, several Maven artifacts - Go: 1.24.3 => 1.24.4 - `golang.org/x/tools`: v0.33.0 => v0.34.0 - `google-common-protos`: 2.57.0 => 2.58.0 - `protoc-bridge`: 0.9.8 => 0.9.9 - `rules_go`: 0.54.1 => 0.55.0 - `sbt-util-interface`: 1.11.0 => 1.11.1
1 parent 4adc0f4 commit 05ecd67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+759
-644
lines changed

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Remove once Bazel 8 becomes the minimum supported version.
22
common --noenable_workspace --incompatible_use_plus_in_repo_names
33

4+
# Uncomment for WORKSPACE builds for Bazel [8.0.0, 8.3.0) per:
5+
# https://github.com/bazelbuild/rules_java/releases/tag/8.12.0
6+
#common --repositories_without_autoloads=bazel_features_version,bazel_features_globals
7+
48
# Remove if protocol compiler toolchainization ever becomes the default.
59
# - https://bazel.build/reference/command-line-reference#flag--incompatible_enable_proto_toolchain_resolution
610
# - https://docs.google.com/document/d/1CE6wJHNfKbUPBr7-mmk_0Yo3a4TaqcTPE0OWNuQkhPs/edit

.github/workflows/release_prep.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -o errexit -o nounset -o pipefail
44

55
# Single tag arg is passed by https://github.com/bazel-contrib/.github/blob/master/.github/workflows/release_ruleset.yaml
66
TAG="$1"
7-
VERSION="${TAG:1}"
7+
VERSION="${TAG#v}"
88
PREFIX="rules_scala-${VERSION}"
99
ARCHIVE="rules_scala-$TAG.tar.gz"
1010
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE

.scalafmt.conf

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

MODULE.bazel

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ single_version_override(
3636
bazel_dep(name = "platforms", version = "0.0.9")
3737
single_version_override(
3838
module_name = "platforms",
39-
version = "0.0.11",
39+
version = "1.0.0",
4040
)
4141

4242
bazel_dep(name = "rules_java", version = "7.6.0")
4343
single_version_override(
4444
module_name = "rules_java",
45-
version = "8.11.0",
45+
version = "8.12.0",
4646
)
4747

4848
bazel_dep(name = "rules_proto", version = "6.0.0")
@@ -63,7 +63,7 @@ single_version_override(
6363
module_name = "protobuf",
6464
patch_strip = 1,
6565
patches = ["//protoc:0001-protobuf-19679-rm-protoc-dep.patch"],
66-
version = "30.2",
66+
version = "31.1",
6767
)
6868

6969
scala_protoc = use_extension(
@@ -254,7 +254,7 @@ bazel_dep(
254254
)
255255
bazel_dep(
256256
name = "rules_go",
257-
version = "0.54.0",
257+
version = "0.55.0",
258258
dev_dependency = True,
259259
repo_name = "io_bazel_rules_go", # for com_github_bazelbuild_buildtools
260260
)
@@ -265,7 +265,7 @@ go_sdk = use_extension(
265265
"go_sdk",
266266
dev_dependency = True,
267267
)
268-
go_sdk.download(version = "1.24.2")
268+
go_sdk.download(version = "1.24.4")
269269

270270
go_deps = use_extension(
271271
"@gazelle//:extensions.bzl",
@@ -287,8 +287,8 @@ go_deps = use_extension(
287287
# curl https://sum.golang.org/lookup/golang.org/x/[email protected]
288288
go_deps.module(
289289
path = "golang.org/x/tools",
290-
sum = "h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc=",
291-
version = "v0.33.0",
290+
sum = "h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=",
291+
version = "v0.34.0",
292292
)
293293
go_deps.module(
294294
path = "github.com/golang/protobuf",
@@ -301,5 +301,5 @@ use_repo(
301301
"org_golang_x_tools",
302302
)
303303

304-
bazel_dep(name = "rules_python", version = "1.4.0", dev_dependency = True)
304+
bazel_dep(name = "rules_python", version = "1.4.1", dev_dependency = True)
305305
bazel_dep(name = "rules_shell", version = "0.4.1", dev_dependency = True)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")
209209

210210
rules_java_dependencies()
211211

212+
load("@bazel_features//:deps.bzl", "bazel_features_deps")
213+
214+
bazel_features_deps()
215+
212216
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
213217

214218
bazel_skylib_workspace()

WORKSPACE

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")
2323

2424
rules_java_dependencies()
2525

26+
load("@bazel_features//:deps.bzl", "bazel_features_deps")
27+
28+
bazel_features_deps()
29+
2630
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
2731

2832
bazel_skylib_workspace()
2933

3034
http_archive(
3135
name = "rules_python",
32-
sha256 = "a837679f1382f26968c1ee6f839c7daf9079aa53128069a1f2815decaa637304",
33-
strip_prefix = "rules_python-1.4.0",
34-
url = "https://github.com/bazelbuild/rules_python/releases/download/1.4.0/rules_python-1.4.0.tar.gz",
36+
sha256 = "9f9f3b300a9264e4c77999312ce663be5dee9a56e361a1f6fe7ec60e1beef9a3",
37+
strip_prefix = "rules_python-1.4.1",
38+
url = "https://github.com/bazelbuild/rules_python/releases/download/1.4.1/rules_python-1.4.1.tar.gz",
3539
)
3640

3741
load("@rules_python//python:repositories.bzl", "py_repositories")
@@ -108,10 +112,10 @@ local_repository(
108112

109113
http_archive(
110114
name = "io_bazel_rules_go",
111-
sha256 = "f2d15bea3e241aa0e3a90fb17a82e6a8ab12214789f6aeddd53b8d04316d2b7c",
115+
sha256 = "c6cf9da6668ac84c470c43cbfccb8fdc844ead2b5a8b918e2816d44f2986f644",
112116
urls = [
113-
"https://mirror.bazel.build/github.com/bazel-contrib/rules_go/releases/download/v0.54.0/rules_go-v0.54.0.zip",
114-
"https://github.com/bazel-contrib/rules_go/releases/download/v0.54.0/rules_go-v0.54.0.zip",
117+
"https://mirror.bazel.build/github.com/bazel-contrib/rules_go/releases/download/v0.55.0/rules_go-v0.55.0.zip",
118+
"https://github.com/bazel-contrib/rules_go/releases/download/v0.55.0/rules_go-v0.55.0.zip",
115119
],
116120
)
117121

@@ -123,7 +127,7 @@ load(
123127

124128
go_rules_dependencies()
125129

126-
go_register_toolchains(version = "1.24.2")
130+
go_register_toolchains(version = "1.24.4")
127131

128132
http_archive(
129133
name = "bazelci_rules",

deps/latest/MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ module(
77
)
88

99
bazel_dep(name = "bazel_skylib", version = "1.7.1")
10-
bazel_dep(name = "platforms", version = "0.0.11")
11-
bazel_dep(name = "protobuf", version = "30.2")
12-
bazel_dep(name = "rules_java", version = "8.11.0")
10+
bazel_dep(name = "platforms", version = "1.0.0")
11+
bazel_dep(name = "protobuf", version = "31.1")
12+
bazel_dep(name = "rules_java", version = "8.12.0")
1313
bazel_dep(name = "rules_proto", version = "7.1.0")
1414

1515
# https://github.com/bazelbuild/bazel/pull/25681 removed

docs/scala_proto_library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ needed for ScalaPB:
66
```py
77
# MODULE.bazel
88
scala_deps.scala_proto(
9-
"default_gen_opts" = [
9+
default_gen_opts = [
1010
"grpc",
1111
"flat_package",
1212
"scala3_sources",

docs/testing.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@
33
Toolchain type `testing_toolchain_type` is used to set up test dependencies. You can customize
44
test dependencies by defining a custom testing toolchain.
55

6-
In your `WORKSPACE` default repositories and toolchains can be loaded via:
6+
Builtin repositories and toolchains can be loaded via:
77

88
```py
9+
# MODULE.bazel
10+
scala_deps = use_extension(
11+
"@rules_scala//scala/extensions:deps.bzl",
12+
"scala_deps",
13+
)
14+
scala_deps.scala() # Ensure builtin Scala toolchain deps are visible
15+
scala_deps.junit() # JUnit 4
16+
scala_deps.scalatest() # ScalaTest
17+
scala_deps.specs2() # Specs2 with JUnit
18+
19+
# legacy WORKSPACE
920
load(
1021
"@rules_scala//scala:toolchains.bzl",
1122
"scala_register_toolchains",
@@ -16,7 +27,6 @@ scala_toolchains(
1627
junit = True, # JUnit 4
1728
scalatest = True, # ScalaTest
1829
specs2 = True, # Specs2 with JUnit
19-
testing = True, # Use for all of the above, instead of individual settings
2030
)
2131

2232
scala_register_toolchains()

dt_patches/test_dt_patches/MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ register_toolchains(
7575
# protocolbuffers/protobuf#19679.
7676
bazel_dep(
7777
name = "protobuf",
78-
version = "30.2",
78+
version = "31.1",
7979
repo_name = "com_google_protobuf",
8080
)
8181
single_version_override(
8282
module_name = "protobuf",
8383
patch_strip = 1,
8484
patches = ["//:protobuf.patch"],
85-
version = "30.2",
85+
version = "31.1",
8686
)

0 commit comments

Comments
 (0)