Using different versions of Protobuf

1,933 views
Skip to first unread message

Andrea Ferretti

unread,
Feb 11, 2016, 1:44:00 PM2/11/16
to Protocol Buffers
Hi, I am trying to understand how to manage the difference in runtime classes across protobuf versions.

Protobuf is designed so that people are able to evolve versions of their own schemas without breaking things. This has some limitations, but in some way works.

The real issue arises when having to do with multiple versions of protobuf itself. Let me take an example: on a new project (written in Scala, using protobuf for Java) we would like to try Protobuf 3. But we have to talk to HBase, and the client itself uses protobuf 2.5.0. We have tried using protobuf 3 and hoping for backward compatibility, but of course everything borke at runtime. So we settled for protobuf 2.5.0. But now we would also need to integrate some things with Apache Kudu. And of course, they use protobuf 2.6.1, and that exact version is required.

Since only one version of protobuf can be on the classpath at any time, this becomes more and more of a problem as the projects using protobuf for their own internal protocol increase.

Does anyone know a way to handle this problem effectively?

Josh Haberman

unread,
Feb 19, 2016, 6:47:00 PM2/19/16
to Protocol Buffers
Hi there,

Many people have run into this issue. To solve it we will be committing to ABI stability for the protobuf 3.0 release. Once 3.0 is released, you will be able to upgrade the core library to a new version without breaking other libraries.

Sorry this can't help you for 2.5/2.6, but in the future things should be better.

Thanks,
Josh
Reply all
Reply to author
Forward
0 new messages