bazelbuild / rules_scala

Scala rules for Bazel
Apache License 2.0
363 stars 278 forks source link

Bump to com.google.protobuf:protobuf-java:4.28.2 #1624

Closed mbland closed 1 month ago

mbland commented 1 month ago

Description

Bumps every Scala version up to use protobuf-java:4.28.2. Part of #1482.

Motivation

As part of my Bzlmod exploration in my rules_scala fork, I found that //test/scalafmt/... wouldn't build under Scala 2.13.14 due to using an outdated Scalafmt version (which I'll describe in a future PR). However, bumping to Scalafmt 3.8.3 produced:

$ bazel test //test/scalafmt/...

INFO: Analyzed 9 targets (80 packages loaded, 3307 targets configured).
ERROR: .../test/scalafmt/BUILD:43:20: ScalaFmt
  test/scalafmt/test/scalafmt/formatted/formatted-test.scala.fmt.output
  failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at .../bazel-workers/worker-134-ScalaFmt.log ---8<---8<---
Exception in thread "main" java.lang.NoSuchMethodError:
  'boolean com.google.protobuf.GeneratedMessageV3.isStringEmpty(java.lang.Object)'
  [ ...snip... ]

This issue seemed to suggest a protobuf-java version bump might fix it, and it did:

Fortunately, even though this is a major version bump from 3.10.0 to 4.28.2, there were no compatibility issues, per:

Protobuf major version releases may also be backwards-compatible with the last release of the previous major version. See the release notice for more details.

cc: @BillyAutrey @jayconrod @benjaminp @TheGrizzlyDev

mbland commented 1 month ago

Rebased and passing after #1627, including latest Bazel 7.3.2.