Skip to content

protobuf 3 compat issues #1239

Description

@pcarrier
  • datastore-v1-protos ships com.google.protobuf.Timestamp which implements com.google.protobuf.GeneratedMessage
  • protobuf-java 3.0.2 ships com.google.protobuf.Timestamp which implements com.google.protobuf.GeneratedMessageV3
  • As a result, with protobuf-java picked by the classloader, google-cloud-datastore classes (eg com.google.datastore.v1.Value.toBuilder) trigger java.lang.VerifyError (Type 'com/google/protobuf/Timestamp' (current frame, stack[1]) is not assignable to 'com/google/protobuf/GeneratedMessage')
  • Excluding datastore-v1-protos from the classpath and generating the classes from proto ourselves then breaks google-cloud-datastore, eg because of its com/google/cloud/datastore/PathElement.toPb()Lcom/google/protobuf/GeneratedMessage;.

I don't even know where to report this, maybe the protobuf team, but I figured the Google Cloud Platform team was a safer bet given it impacts their customers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions