Skip to content

Add J2ObjC proto companion properties for message extensions. - #2909

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1014722639
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1014722639

Conversation

@copybara-service

Copy link
Copy Markdown

Add J2ObjC proto companion properties for message extensions.

To support forward compatibility with Kotlin/Native proto codegen (kt_ios_proto_library) in Objective-C and Swift:

  • Emit @property (nonnull, readonly) ComGoogleProtobufGeneratedMessage_GeneratedExtension *<name>; on <MessageClass>CompanionProtocol and the corresponding class getter method on <MessageClass> for message-scoped extensions when generate_properties is enabled.
  • Add typedef ComGoogleProtobufExtensionLite KNPComGoogleProtobufExtensionLite; in ExtensionLite.h.
  • Add Objective-C and Swift interop tests for message-scoped extensions.

To support forward compatibility with Kotlin/Native proto codegen (`kt_ios_proto_library`) in Objective-C and Swift:
- Emit `@property (nonnull, readonly) ComGoogleProtobufGeneratedMessage_GeneratedExtension *<name>;` on `<MessageClass>CompanionProtocol` and the corresponding class getter method on `<MessageClass>` for message-scoped extensions when `generate_properties` is enabled.
- Add `typedef ComGoogleProtobufExtensionLite KNPComGoogleProtobufExtensionLite;` in `ExtensionLite.h`.
- Add Objective-C and Swift interop tests for message-scoped extensions.

PiperOrigin-RevId: 1014722639

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant