GRPC C++ Protobuf Dependencies

237 views
Skip to first unread message

Colin Versteeg

unread,
Jun 6, 2019, 5:22:57 PM6/6/19
to grpc.io
Hi, 

I have general questions about the stability of the codegen tool, generated code and channelz/reflection, etc plugins across protobuf versions. Do grpc and protobuf offer any expectations of compatibility, either forwards or backwards, or is one required to use grpc 1.19.x with protobuf 3.6.1, protobuf 3.7.0 with 1.20.x and 1.21.x, etc.  

Thanks,
Colin

Nicolas Noble

unread,
Jun 6, 2019, 6:45:22 PM6/6/19
to Colin Versteeg, grpc.io
We can start with this: for C++, protobuf doesn't offer ABI compatibility on minor releases. Meaning that if you generate code with protobuf version 3.n, it won't work against protobuf version 3.n+1. This naturally extends to gRPC. That being said, gRPC doesn't necessarily has a strong requirement for a specific version of protobuf, barring any requirement for any new API from protobuf we may have. But the ABI thing from protobuf means that you should always regenerate your code at all times when compiling, and you shouldn't use protobuf (or gRPC++) as a dynamic library because of this, and instead always statically link with the version of protobuf+grpc you generated your code for.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/DM5PR2101MB087231E122C869F397D90D03CE170%40DM5PR2101MB0872.namprd21.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages