-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Distributed] distributed decls working across files #39087
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
E.g.
Pretty weird since the synthesis did trigger nicely and once when it's supposed to.. but then in the checking of the second file, it seems as if all those are not visible. |
@swift-ci please smoke test |
@swift-ci please build toolchain macOS |
Huh, actually uncovered and fixed an initializer visibility issue -- otherwise things seem good actually 🤔 |
macOS Toolchain Install command |
@swift-ci please smoke test Failure was only windows, but let's see if hardening helped there now. |
@@ -321,6 +321,9 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl, | |||
"Only 'distributed actor' type can gain implicit distributed actor init"); | |||
|
|||
if (swift::ensureDistributedModuleLoaded(decl)) { | |||
// copy access level of distributed actor init from the nominal decl | |||
accessLevel = decl->getEffectiveAccess(); |
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.
this fixes the accessibility of the created init to be the same as the class for a dist actor.
707c902
to
7dec875
Compare
|
||
if (auto *func = dyn_cast<FuncDecl>(member)) { | ||
(void) func->getDistributedActorRemoteFuncDecl(); | ||
} |
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.
so basically we need to trigger synthesis/"get" in same spots as property wrappers most of the time -- one is here, and another is in lookups
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.
(The lookups solve the across files case.)
7dec875
to
d76690e
Compare
@swift-ci please smoke test |
@swift-ci please build toolchain macOS |
Linux failure seems to be unrelated
|
@swift-ci please smoke test Linux |
macOS Toolchain Install command |
Confirmed things work thanks to this addition! |
Looking into what's missing or done wrong because we can't get distributed actors work well across files it seems right now.