#1 has a big drawback. Generated protobuf code is not backwards for forwards compatible between versions of gRPC and protobuf. If you distribute generated code as a library, all users of that library are locked to the same versions of gRPC and protobuf that generated it.
To make #1 work, you need to maintain generated packages for each proto version you want to support times each gRPC version you want to support. Distributing generated code is a versioning nightmare. On Monday, October 29, 2018 at 3:43:10 PM UTC-7, [email protected] wrote: > > > Hi, > > Currently, we maintain a single repository for storing proto files for > multiple microservices. And we would use these protobufs for implementing > services in specific languages. I recently read this blog which mentions > about packaging generated code into libraries and distributing it. I would > like to know which is the best recommended option? > 1. Package generated code into libraries and distribute it > 2. Maintain protos in single repo and distribute it & services/clients can > get the proto files and build the generated code and use it > > Thanks, > Dinesh P S > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/ba2009b9-40f7-4d85-b88b-8585dec4d089%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
