Closed eseay closed 3 weeks ago
Thanks for opening this @eseay!
Supporting the deprecated
option makes a lot of sense to me, and I think it'd be a good addition to Connect-Swift.
Is this something that the Connect community would like to try to revitalize? Do the challenges that prevented the feature from being implemented some years ago still exist?
Can you comment on the upstream SwiftProtobuf issue you linked to in order to see if anything has changed on their end?
Is there merit in adding this functionality to the connect-swift plugin for its generated services in the absence of it being implemented for models and properties in swift-protobuf?
I think so! We should be able to generate this at least for RPCs (and probably services, though we'd need to see if we run into a similar issue as SwiftProtobuf with the generated protocols and their class implementations). Are you interested in doing some of this exploration?
we'd need to see if we run into a similar issue as SwiftProtobuf with the generated protocols and their class implementations)
Did a quick test, and I think we should be good on this
Essentially a clone of https://github.com/connectrpc/connect-kotlin/issues/333, but for Swift. Examples below largely influenced by that issue in connect-kotlin.
This would be a very helpful enhancement to the library, as it would allow more effective passive communication from services to their dependents about when certain existing functionality is being deprecated.
There is an ongoing discussion in the apple/swift-protobuf library here about adding this functionality to swift-protobuf itself. Given the age of that discussion, I'd like to consider:
Would generate output like:
There are obviously a few more details to this that we have to consider for other function types, as this only demonstrates a proposed change for the async functions, but all adjustments would be fundamentally similar in nature.