connectrpc / connect-swift

The Swift implementation of Connect: Protobuf RPC that works.
https://connectrpc.com/docs/swift/getting-started
Apache License 2.0
97 stars 20 forks source link

Add support for Protobuf Editions #284

Closed rebello95 closed 3 months ago

rebello95 commented 3 months ago

This PR adds support for Protobuf Editions to Connect-Swift plugins. There is no change to generated outputs in this PR, but it adds supportsEditions and supportedEditionRange specifications in the Generator class to ensure the Connect plugins can run with Protobuf files that use Editions.

SwiftProtobuf also deprecated some usages of Google_Protobuf_Compiler_CodeGeneratorResponse:

'Google_Protobuf_Compiler_CodeGeneratorResponse.init(files:supportedFeatures:)' is deprecated: Please move your plugin to the CodeGenerator interface

As part of these changes, I migrated over to using CodeGenerator in order to be able to specify the new Editions-related variables mentioned above.

rebello95 commented 3 months ago

(Had to rebase for DCO)