com.google.protobuf dependency

37 views
Skip to first unread message

Scott Lewis

unread,
Aug 28, 2024, 1:34:38 PMAug 28
to grpc.io
I see from the build files that version 1.66.0 of grpc (released a few weeks ago) is using version 3.25.3 of com.google.protobuf:protobuf-java library.

Question:   Is grpc going to switch at some point to 4.x of protobuf library?  Or is it going to stay on 3.X of the protobuf-java library?   Is staying on 3.X a matter of backward compatibility?

Also, I know this is a protobuf question, but perhaps one of the grpc folks will know the answer:   For the protobuf library for langauge serialization interoperatibility (e.g. python and java) is the convention to have com.google.protobuf versions be same number imply compatibility (e.g. java: 3.25.3 -> python 3.25.3, or just python 3.X, or ???)

Thanksinadvance,

Scott

Eric Anderson

unread,
Aug 28, 2024, 1:45:18 PMAug 28
to Scott Lewis, grpc.io
On Wed, Aug 28, 2024 at 10:34 AM Scott Lewis <scott...@gmail.com> wrote:
Question:   Is grpc going to switch at some point to 4.x of protobuf library?  Or is it going to stay on 3.X of the protobuf-java library?   Is staying on 3.X a matter of backward compatibility?

See https://github.com/grpc/grpc-java/issues/11015 . Protobuf 4.x was fully incompatible with 3.x generated code which gave the ecosystem with no real way to upgrade. Just yesterday protobuf released 4.27.4 which is compatible with 3.x generated code.

Also, I know this is a protobuf question, but perhaps one of the grpc folks will know the answer:   For the protobuf library for langauge serialization interoperatibility (e.g. python and java) is the convention to have com.google.protobuf versions be same number imply compatibility (e.g. java: 3.25.3 -> python 3.25.3, or just python 3.X, or ???)

The versions don't need to match at all. Most features you use will work in any language. Some new features may come to one language before another, but it is rare that such cross-language features are added and you can just track the versions it becomes available for the languages you care about.

Scott Lewis

unread,
Aug 28, 2024, 5:49:53 PMAug 28
to grpc.io
Thanks much for the info.

In addition to grpc-java, I'm also using grpc-python but don't see any protobuf 4 upgrade issues here:  


Do you have any insight about protobuf 4 support for python grpc specifically (or other languages more generally)?   It looks like the languages try to stay in sync wrt major and minor segments, but I imagine the teams have different priorities.

Or should I open an issue for python grpc wrt protobuf 4 support?

Thanksinadvance.
Reply all
Reply to author
Forward
0 new messages