Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protoc-gen-grpc-java: support edition 2023 #11526

Open
jacekbe opened this issue Sep 16, 2024 · 1 comment
Open

protoc-gen-grpc-java: support edition 2023 #11526

jacekbe opened this issue Sep 16, 2024 · 1 comment
Assignees
Milestone

Comments

@jacekbe
Copy link

jacekbe commented Sep 16, 2024

Is your feature request related to a problem?

I'm trying to generate Java classes from proto file using edition="2023" syntax. It works with protoc when no plugin is enabled, but once I add java plugin I get this error:

./protoc-4.28.1-linux-x86_64.exe --plugin=protoc-gen-grpc-java=protoc-gen-grpc-java-1.66.0-linux-x86_64.exe --grpc-java_out=out --proto_path=proto test.proto
[libprotobuf ERROR google/protobuf/descriptor.cc:4199] Invalid proto descriptor for file "test.proto":
[libprotobuf ERROR google/protobuf/descriptor.cc:4202]   test.proto: Unrecognized syntax: editions
--grpc-java_out: protoc-gen-grpc-java: Plugin failed with status code 1.

Is above behavior expected at this point or am I doing something wrong? I see support was added in this commit:
532241450
By the way, comment and preprocessor directive refer to protobuf version 5.27. Shouldn't it be 4.27?

Even if version typo is a culprit I suppose that it won't be enough because, if I understand correctly, grpc-java internally uses protobuf 21.7?
buildscripts/make_dependencies.sh:6:PROTOBUF_VERSION=21.7
https://github.com/grpc/grpc-java/blob/master/buildscripts/make_dependencies.sh#L6

Describe the solution you'd like

protoc-gen-grpc-java should support edition="2023" syntax.

Describe alternatives you've considered

I can use proto3 for now.

Additional context

(none)

@ejona86
Copy link
Member

ejona86 commented Sep 18, 2024

This is blocked on upgrading C++ protobuf. Adding the absl dependency greatly disrupted the build. #10048

@ejona86 ejona86 added this to the Next milestone Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants