-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Distributed] Implicit Codable conformance for distributed actors #41727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6bca6b2
to
3ee81e0
Compare
So we have the conformance in place but I can't figure out where or how to ensure the witness symbols get emitted
Technically we have the @available(SwiftStdlib 5.7, *)
extension DistributedActor /*: implicitly Encodable */ where Self.ID: Encodable {
nonisolated public func encode(to encoder: Encoder) throws { so i was hoping to not have to do anything extra but that does not seem to be the case. I tried setting the witness when we create the conformance explicitly as well but that does no good either. We cannot find the above extension on the protocol either because |
3ee81e0
to
a8d5ce4
Compare
a8d5ce4
to
d635bf0
Compare
@swift-ci please smoke test |
Rebased :) |
f82f6d5
to
5ced12f
Compare
@swift-ci please smoke test |
Actual issue, fixing it.
|
@swift-ci please smoke test |
Only reason this failed was because #41602 got merged in between... |
[Witness] implement dump() on witness
debb63b
to
e4252a0
Compare
e4252a0
to
fab0463
Compare
@swift-ci please smoke test and merge |
Codable conformance is synthesized for any concrete DistributedActor when the ID it has is Codable.
This would not be implementable in "normal" swift due to the need to assign to self in the initializer.