Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Compatibility with Protobuf-Java 4.26.x+ #2034

Open
lqiu96 opened this issue May 17, 2024 · 2 comments · May be fixed by #2068
Open

Library Compatibility with Protobuf-Java 4.26.x+ #2034

lqiu96 opened this issue May 17, 2024 · 2 comments · May be fixed by #2068
Assignees
Labels
api: pubsub Issues related to the googleapis/java-pubsub API.

Comments

@lqiu96
Copy link
Contributor

lqiu96 commented May 17, 2024

Protobuf has released v26.x+ which introduces a bunch of breaking changes for Protobuf-Java. Release notes for the version can be found at https://github.com/protocolbuffers/protobuf/releases/tag/v26.0

We have identified the generated StateProto.java from us-states.proto has a bunch of references to removed methods.

The generated proto files should be re-generated with the latest protoc version (i.e. 3.25.x+). Investigate if the proto file needs to be updated before re-generating.

See this doc for more information.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/java-pubsub API. label May 17, 2024
@kutlueren
Copy link

kutlueren commented Jun 7, 2024

We have encountered a similar problem. I have upgraded our Protobuf version to 4.26.1 and the pubsub library started failing due to depending on the version 3.25.3 of Protobuf.

@emintz
Copy link

emintz commented Jul 31, 2024

Compiling

  ByteString data = event.toByteString();
  PubsubMessage notification = PubsubMessage.newBuilder()
      .setData(data)
      .build();

generates
java: cannot access com.google.protobuf.GeneratedMessageV3.Builder
class file for com.google.protobuf.GeneratedMessageV3$Builder not found

Regenerating us-states-proto is probably not enough to fix the problem.

Further info when available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/java-pubsub API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants