Skip to content

[SILGen] Ensure that we emit the distributed-actor-as-actor conformance #71105

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

Merged

Conversation

DougGregor
Copy link
Member

The distributed-actor-as-actor conformance is synthesized by the frontend, so make sure that when we access the API that exposes it (asLocalActor), we be sure to mark the conformance as "used".

This is a very specific workaround for general problem with compiler-synthesized conformances. SIL deserialization can bring in a reference to a conformance late in the SIL pipeline, after the point at which SILGen can create the conformance. We should be able to address this systemically to remove the hack.

The distributed-actor-as-actor conformance is synthesized by the
frontend, so make sure that when we access the API that exposes it
(asLocalActor), we be sure to mark the conformance as "used".

This is a very specific workaround for general problem with
compiler-synthesized conformances. SIL deserialization can bring in a
reference to a conformance late in the SIL pipeline, after the point at
which SILGen can create the conformance. We should be able to address
this systemically to remove the hack.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor enabled auto-merge January 24, 2024 03:36
Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm I see, this feels similar to what we had to do for for adhoc requirement witnesses (see "adhoc" in codebase) but different in that it is a conformance...

As far as I get it at least, LGTM, thank you!

@DougGregor DougGregor merged commit 5c83cae into swiftlang:main Jan 24, 2024
@DougGregor DougGregor deleted the silgen-hack-distributed-actor-as-actor branch January 24, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants