Skip to content

Conversation

Jozott00
Copy link
Collaborator

Subsystem
gRPC/Common - Protobuf

Problem Description
The Kotlin source code generation for KMP common was missing.

Solution
This PR adds initial generation support for messages with primitive fields and primitive repeated fields.

This also adds a temporary option to the protoc plugin to distinguish between JVM and KMP common generation. This is required, as the current JVM implementation uses the same plugin.

@Jozott00 Jozott00 self-assigned this Jul 30, 2025
@Jozott00 Jozott00 added the feature New feature or request label Jul 30, 2025
@Jozott00 Jozott00 requested a review from Mr3zee July 30, 2025 13:57
Copy link
Member

@Mr3zee Mr3zee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with minor comments
Please also run updateLegasyApi to check that nothing has leaked into the public view

Jozott00 added 2 commits July 30, 2025 16:44
Signed-off-by: Johannes Zottele <[email protected]>
@Jozott00 Jozott00 merged commit 56372ad into grpc-common Jul 30, 2025
2 of 3 checks passed
Mr3zee pushed a commit that referenced this pull request Aug 1, 2025
)

* grpc-native: First message generation

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Support for repeated fields in Message generation

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Remove guards in generated kotlin

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Move internal decode/encoding into grpc.pb package and move common proto generation to commonTest

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Address PR comments

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Rename ProtosTest class

Signed-off-by: Johannes Zottele <[email protected]>

---------

Signed-off-by: Johannes Zottele <[email protected]>
Mr3zee pushed a commit that referenced this pull request Aug 4, 2025
)

* grpc-native: First message generation

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Support for repeated fields in Message generation

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Remove guards in generated kotlin

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Move internal decode/encoding into grpc.pb package and move common proto generation to commonTest

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Address PR comments

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Rename ProtosTest class

Signed-off-by: Johannes Zottele <[email protected]>

---------

Signed-off-by: Johannes Zottele <[email protected]>
@Jozott00 Jozott00 deleted the grpc/protoc-kt branch August 4, 2025 18:20
Mr3zee pushed a commit that referenced this pull request Aug 8, 2025
)

* grpc-native: First message generation

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Support for repeated fields in Message generation

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Remove guards in generated kotlin

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Move internal decode/encoding into grpc.pb package and move common proto generation to commonTest

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Address PR comments

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Rename ProtosTest class

Signed-off-by: Johannes Zottele <[email protected]>

---------

Signed-off-by: Johannes Zottele <[email protected]>
Mr3zee pushed a commit that referenced this pull request Aug 21, 2025
)

* grpc-native: First message generation

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Support for repeated fields in Message generation

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Remove guards in generated kotlin

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Move internal decode/encoding into grpc.pb package and move common proto generation to commonTest

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Address PR comments

Signed-off-by: Johannes Zottele <[email protected]>

* grpc-native: Rename ProtosTest class

Signed-off-by: Johannes Zottele <[email protected]>

---------

Signed-off-by: Johannes Zottele <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants