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

v9.10 release of Java OR-Tools contains a binary-breaking upgrade to protobuf-java #4218

Closed
DavidGregory084 opened this issue May 8, 2024 · 4 comments
Assignees
Labels
Bug dependencies Pull requests that update a dependency file Lang: Java Java wrapper issue
Milestone

Comments

@DavidGregory084
Copy link

Version: v9.10
Language: Java

The Java bindings for OR-Tools v9.9 depend upon protobuf-java 3.25.x.

The Java bindings for OR-Tools v9.10 depend upon protobuf-java 4.26.1, which isn't binary-compatible with 3.x.

It's not a big deal, as users can simply downgrade, but should this release be relabelled v10?

@lperron
Copy link
Collaborator

lperron commented May 8, 2024

no, the use of protobuf is only internal. So even if its API change, it does not impact OR-Tools.

@lperron lperron closed this as completed May 8, 2024
@DavidGregory084
Copy link
Author

DavidGregory084 commented May 9, 2024

no, the use of protobuf is only internal. So even if its API change, it does not impact OR-Tools.

The public API of the Java bindings is full of proto classes, like MPSolver#solveWithProto, which returns an MPSolutionResponse that extends GeneratedMessage.

Unfortunately the protobuf 3.x runtime is still used in OpenTelemetry, grpc and many other open source projects.

Users trying to run OR-Tools Java v9.10 alongside any of those libraries will most likely run into ClassNotFoundException: com.google.protobuf.GeneratedMessageV3 after their build tool bumps protobuf-java up to 4.x.

I think that this is a manifestation of protocolbuffers/protobuf#16452.

@lperron
Copy link
Collaborator

lperron commented May 9, 2024

for many reasons, we have no choice but to follow closely the releases of abseil, protobuf and re2.
Unfortunately, if other projects do not release updated versions, you are stuck with an older version.

@Mizux Mizux self-assigned this May 11, 2024
@Mizux Mizux added Bug Lang: Java Java wrapper issue dependencies Pull requests that update a dependency file labels May 11, 2024
@Mizux Mizux added this to the v10.0 milestone May 11, 2024
@lperron
Copy link
Collaborator

lperron commented May 12, 2024

Grpc has also been updated to use protobuf 26.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug dependencies Pull requests that update a dependency file Lang: Java Java wrapper issue
Projects
None yet
Development

No branches or pull requests

3 participants