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

Provide .proto files with Editions Syntax and .class files compatible with protobuf-java v4 #2719

Open
ghost opened this issue May 2, 2024 · 2 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@ghost
Copy link

ghost commented May 2, 2024

Is your feature request related to a problem? Please describe.
It is currently not possible to fully use Protobuf Editions in most of my company's protobuf definitions, because the dependency com.google.api.grpc:proto-google-common-protos is not provided in a Protobuf 2023 version. We depend on types like google.type.Date almost everywhere.

Transcompiling our own .proto-Files leads to Java code that is dependent on com.google.protobuf:protobuf-java in v4, but the precompiled classes in com.google.api.grpc:proto-google-common-protos require v3 and there are binary incompatible changes between the two. It is therefore not possible to use com.google.api.grpc:proto-google-common-protos as before.

Describe the solution you'd like
A new version of the library is published that contains .proto files in Protobuf 2023 syntax and .class files compatible with com.google.protobuf:protobuf-java v4.x.y

Describe alternatives you've considered
If no new version of the library is provided by google itself, we'd have to resort to distributing our own company-internal fork of the library that contains the updated .proto files (optional) and .class files precompiled with protoc v4.

Since the Java-Runtime v3 reaches end of support within a year and our company (and I imagine other companies as well) cannot switch all or protobuf over night, this cannot remain unresolved for long.

@blakeli0 blakeli0 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels May 2, 2024
@ghost
Copy link
Author

ghost commented May 3, 2024

I am under the impression that proto3-Syntax will still compile for a while, even with newer versions of protoc. So that's not what I'm most worried about. I'm more worried about the protobuf-java dependency so if it's possible to release the same protos, but with .class-files that depend on protobuf-java v4, then that would be fine for me as well.

I'm not sure yet what new features we will use in our company. Probably the feature to locally declare an enum-type as open / closed. That always causes a little bit of confusion among new colleagues. Other than that we'd be fine using proto3 for a while longer, but without an up-to-date runtime that's not the preferred option for us.

@blakeli0 blakeli0 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 10, 2024
@blakeli0
Copy link
Collaborator

See the responses 1 and 2 from the protobuf team. They are still figuring out the best way but the good news is the support for 3.25.x is extended to Q1 of 2026.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant