Issue 210 in protobuf: Broken backwards compatibility of protobuf-java library between 2.0.x and 2.3.x

377 views
Skip to first unread message

prot...@googlecode.com

unread,
Jul 29, 2010, 12:23:06 PM7/29/10
to prot...@googlegroups.com
Status: New
Owner: ken...@google.com
Labels: Type-Defect Priority-Medium

New issue 210 by aantono: Broken backwards compatibility of protobuf-java
library between 2.0.x and 2.3.x
http://code.google.com/p/protobuf/issues/detail?id=210

What steps will reproduce the problem?
1. Generate java sources from any proto file using protoc 2.0.3
2. Compile the generates source files using protobuf-java lib 2.0.3 and
create a model jar
3. Use the compiled model jar in a runtime environment with protobuf-java
2.3.0

What is the expected output? What do you see instead?
It is expected that the runtime would succeed instead of exploding with an
exception due to method signature changes in
Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(...)


What version of the product are you using? On what operating system?
CentOS 5 with protobuf 2.0.3 and 2.3.0

Please provide any additional information below.

java.lang.NoSuchMethodError:
com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom(Ljava/lang/String;[Lcom/google/protobuf/Descriptors$FileDescriptor;Lcom/google/protobuf/Descriptors$FileDescriptor$InternalDescriptorAssigner;)V

The change was made to com.google.protobuf.Descriptors.java in r189
http://code.google.com/p/protobuf/source/diff?spec=svn189&r=189&format=side&path=/trunk/java/src/main/java/com/google/protobuf/Descriptors.java

Suggested fix is to add an old method back as an overload and just pass it
to the new signature by wrapping the single String into a
String[]{descriptorData} to preserve backwards compatibility with library
artifacts that were compiled against 2.0.x previously.

prot...@googlecode.com

unread,
Jul 29, 2010, 2:49:46 PM7/29/10
to prot...@googlegroups.com
Updates:
Status: WontFix

Comment #1 on issue 210 by ken...@google.com: Broken backwards

compatibility of protobuf-java library between 2.0.x and 2.3.x
http://code.google.com/p/protobuf/issues/detail?id=210

protoc and the runtime library are tightly coupled. You cannot use an
older protoc with a newer runtime nor vice versa. Your suggested fix would
only solve one small problem of many. Sorry, I realize this could be
inconvenient, but that's how the system is designed.

prot...@googlecode.com

unread,
Jul 29, 2010, 2:56:04 PM7/29/10
to prot...@googlegroups.com

Comment #2 on issue 210 by jacob.tomaw: Broken backwards compatibility of
protobuf-java library between 2.0.x and 2.3.x
http://code.google.com/p/protobuf/issues/detail?id=210

What is the expected compatibility between the library and protoc? Only
exact versions are ever compatible?

Reply all
Reply to author
Forward
0 new messages