Sync Kotlin protobuf version with Java protobuf version #48108
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Quarkus 3.21 added support for the Kotlin extension of Java gRPC. With this support however, protobuf-kotlin was given a protobuf V4 version. The Java protobuf version published by Quarkus is however a protobuf V3 version. V4 has a breaking change around a class rename of
GeneratedMessageV3
toGeneratedMessage
, which is one of the reasons Quarkus is still on V3.Publishing a V4 version of Kotlin but a V3 version of Java causes incompatibility exactly due to this breaking change. So the project I work on which is using Quarkus is getting the following error:
This is fixed by giving protobuf-kotlin a V3 version. I think it makes sense for both Java and Kotlin to always be synced up, so I simply change the hardcoded protobuf-kotlin version to the protoc version that Java is using too, which changes Kotlin to a V3 version.
Note that theoretically, the versions of different languages of protobuf may diverge. While the minor and patch version will always be the same, the major version may change if one language has a breaking change but another does not. So theoretically Kotlin may at some point get a version like 6.80.1 while Java would be 7.80.1, however, I would say this is unlikely since Kotlin extends the Java implementation, whereas something like C# and Java diverting I would say would be an actual possibility.