Comment #15 on issue 493 by oliver.j...@gmail.com: protobuf-java (2.5.0)
GeneratedMessage#getUnknownFields() not implemented
http://code.google.com/p/protobuf/issues/detail?id=493
protobuf requires that if you have some generated class G that was
generated using protoc version V, then G must resolve the protobuf support
classes at runtime to protobuf library version V.
So if you are distributing the generated code G, then have it declare a
dependency on protobuf library version V. I thought this was the case you
were describing above with hadoop-mapreduce; is this not what you meant?
If you are *building* G, then you need to make sure that the declared
dependencies of G match the version of protoc you actually used. This isn't
too hard to do with Ivy/Ant: I use an ivy module that provides an Ant task
that builds with a particular protoc version, and a configuration with a
transitive dependency on the matching runtime library version. I don't know
about doing the equivalent with Maven.
In your example with OpenFoo, either (a) OpenFoo happens to use protobuf as
an implementation detail, and you can use one of the approaches I suggested
in my previous comment; or (b) OpenFoo exposes protobuf classes as part of
the API you want to deal with in your main project, and you must make sure
that all parts of that interacting system have the same version of protobuf
- this _is_ the "can only use one version" case again. You have two options
here: (1) use protobuf 2.4 for your project; (2) create or build a new
version of OpenFoo that supports 2.5.
As far as I can see this really looks no different to any other case where
you have two pieces of interacting code that want to use the same library,
but there are incompatibilities in the two library versions that they want
to use.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.