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

Support Protobuf Java V4+ #32

Open
lockhartja opened this issue May 31, 2024 · 9 comments
Open

Support Protobuf Java V4+ #32

lockhartja opened this issue May 31, 2024 · 9 comments
Assignees

Comments

@lockhartja
Copy link

lockhartja commented May 31, 2024

Seems to be a breaking change with the latest release of com.google.protobuf:protobuf-java, currently this code

@Target(AnnotationTarget.CLASS)
annotation class KrotoDC(
   val forProto: KClass<out GeneratedMessageV3>
)

breaks to due to a signature change to com.google.protobuf.GeneratedMessage....

here is a link to the change announcement
[Java] The base class for generated messages will be GeneratedMessage, not GeneratedMessageV3.

any plans to version bump the dependencies?

@mscheong01
Copy link
Owner

Hi @lockhartja 👋
Thanks for informing me about this.
I'll look into the protobuf-java updates and come up with a new release sometime soon.

@mscheong01 mscheong01 self-assigned this Jun 1, 2024
@pambrose
Copy link

pambrose commented Jun 1, 2024

Along the same lines, I had to add com.google.protobuf:protobuf-java-util to my build.gradle.kts after the KrotoDC 1.1.1 update. Without it, import com.google.protobuf.util.JsonFormat was breaking in the generated files.

@mscheong01
Copy link
Owner

@pambrose yes, it was added in 1.1.0 for json serialization support. I did write a heads up on the release note but it seems that I might have had to make it more noticeable 😢

@mscheong01
Copy link
Owner

I've looked into the changes and found out that grpc-java hasn't yet upgraded to protobuf-java V4 (latest version uses 3.25.1).
They seem to be unable to upgrade to v4 currently because of some major breaking changes. The progress is being tracked in this issue.
I'll keep an eye on it and get krotoDC to support v4 once grpc-java gets updated.

@mscheong01
Copy link
Owner

image 😃

@lockhartja
Copy link
Author

@mscheong01 tracking the conversation -- are you able to move to the latest grpc-java...which should allow your community to move protobuf 4?

@mscheong01
Copy link
Owner

@lockhartja I've currently identified a problem where the hasOptionalKeyword method has become private, which breaks the code where we access it 🥲. I haven't had the time to attempt a fix lately, but I'll keep this issue updated

@lockhartja
Copy link
Author

@mscheong01 was just reviewing and wanted to inquire -- does this blocked by an upstream dependency or simply a waiting for your available bandwidth to increase

@mscheong01
Copy link
Owner

Hi @lockhartja
First of all, sorry about the delay 😞
As for the cause of krotoDC being stuck to v3, both reasons that you listed are correct. I had 0 spare time lately due to my new internship over the summer and have not been able to make required change requests to the upstream protobuf project.
I've just opened a PR on protobuf repo: protocolbuffers/protobuf#17714 (which definitely shouldn't have taken this long 😭 )
Which will eliminated our current existing identified blocker to v4 and hopefully we'll be able to move up to v4 once this is merged & released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants