Skip to content

protobuf 33.4#419

Merged
benjaminp merged 2 commits intomainfrom
protobuf
Mar 11, 2026
Merged

protobuf 33.4#419
benjaminp merged 2 commits intomainfrom
protobuf

Conversation

@benjaminp
Copy link
Contributor

No description provided.

benjaminp and others added 2 commits March 10, 2026 14:59
Using Bazel 9 with `protobuf` v34.0 automatically enables the prebuilt
`protoc` toolchain from `@protobuf`. There's no need to keep using the
`rules_scala` toolchain, which breaks with `protobuf` v34.0 because
`rules_scala` v7.2.4 doesn't support it. See
bazel-contrib/rules_scala#1820.

Also contains `MODULE.bazel.lock` updates generated by the
`--lockfile_mode=refresh` flag.

`bazel build //...` and `bazel test //...` both succeed. However, this
still causes a `protoc` rebuild, thanks to a `@grpc-java` dependency:

```txt
$ bazel query 'somepath(//..., @protobuf//:protoc)'

//java/com/engflow/notificationqueue/demoserver:server_java_grpc_proto
@grpc-java//compiler:java_grpc_library_toolchain
@protobuf//:protoc
```

`@grpc-java//compiler:java_grpc_library_toolchain` is a
`java_grpc_library` target. That rule's `_protoc` attribute is hardcoded
to `Label("@com_google_protobuf//:protoc")`:

- https://github.com/grpc/grpc-java/blob/v1.79.0/compiler/BUILD.bazel#L44-L49
- https://github.com/grpc/grpc-java/blob/v1.79.0/java_grpc_library.bzl#L44
Copy link
Contributor

@mbland mbland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Pushed a57deca to fix the build. Had to kick the ci-runners-test-matrix (true) job to get it unstuck enough to finally pass. Copying the commit message here for visibility:

Using Bazel 9 with protobuf v34.0 automatically enables the prebuilt protoc toolchain from @protobuf. There's no need to keep using the rules_scala toolchain, which breaks with protobuf v34.0 because rules_scala v7.2.4 doesn't support it. See bazel-contrib/rules_scala#1820.

Also contains MODULE.bazel.lock updates generated by the --lockfile_mode=refresh flag.

bazel build //... and bazel test //... both succeed. However, this still causes a protoc rebuild, thanks to a @grpc-java dependency:

$ bazel query 'somepath(//..., @protobuf//:protoc)'

//java/com/engflow/notificationqueue/demoserver:server_java_grpc_proto
@grpc-java//compiler:java_grpc_library_toolchain
@protobuf//:protoc

@grpc-java//compiler:java_grpc_library_toolchain is a java_grpc_library target. That rule's _protoc attribute is hardcoded to Label("@com_google_protobuf//:protoc"):

@benjaminp
Copy link
Contributor Author

Thanks for the concierge service. Glad it could be fixed by deleting lines. :)

@benjaminp benjaminp merged commit 5a93d19 into main Mar 11, 2026
17 of 20 checks passed
@benjaminp benjaminp deleted the protobuf branch March 11, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants