Conversation
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
mbland
left a comment
There was a problem hiding this comment.
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"):
|
Thanks for the concierge service. Glad it could be fixed by deleting lines. :) |
No description provided.