rules-proto-grpc / rules_proto_grpc

Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
https://rules-proto-grpc.com
Apache License 2.0
250 stars 157 forks source link

rules_proto_grpc_java generates V2 proto code instead V3 #348

Closed jduan-highnote closed 1 week ago

jduan-highnote commented 3 weeks ago

Issue Description

I tried out the provided java example here https://github.com/rules-proto-grpc/rules_proto_grpc/blob/master/examples/java/java_grpc_compile/BUILD.bazel and bazel build thing_java_grpc generated java code that extends com.google.protobuf.GeneratedMessage which is old. It should have generated Java code that extends com.google.protobuf.GeneratedMessageV3.

Log Output

No response

rules_proto_grpc Version

from the latest main branch of this repo

Bazel Version

from the latest main branch of this repo

OS

MacOS Sonoma 14.6.1

Link to Demo Repo

No response

MODULE.bazel or WORKSPACE Content

I'm using this repo itself.

BUILD Content

No response

Proto Content

No response

Any Other Content

No response

jduan-highnote commented 3 weeks ago

I'm using this sha 11a653864bee673ecb623444163599d71e197aa6

f355 commented 1 week ago

com.google.protobuf.GeneratedMessage is not old, it is new. See https://protobuf.dev/news/2023-12-05/.

jduan-highnote commented 1 week ago

@f355 wow, I didn't know that! Thank you for sharing. We need to update our code base to work with this incompatibility.