-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Distributed][Macro] Handle more cases in distributed protocol macro #72177
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
ab06f36
to
99450d7
Compare
@swift-ci please smoke test |
We may have a valid distributed actor stub without where requirement if a typealias was used;
99450d7
to
09298ae
Compare
@swift-ci please smoke test |
Lots of cleanups to the macros, thanks to landing all our previous changes 👍 |
|
||
@_DistributedProtocol | ||
protocol Greeter: DistributedActor where ActorSystem == FakeActorSystem { | ||
distributed func greet(name: String) -> String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just going to leave an enhancement request here - I think we need to get tested at least:
- methods with generic parameters
- distributed variables i.e. protocol requirements like
distributed var compute: Int { get set }
- Multiple distributed members
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call on properties actually, I don't think we roundtrip tested them yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Covered all these and will add runtime tests as well in a follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
09298ae
to
f7b27ec
Compare
@swift-ci please smoke test |
@swift-ci please smoke test Windows |
The distributed protocol macro was blocked from generating the full right thing until we fixed generic actors and protocols and the Codable actor behaviors.
A few more cases to be handled here.