Skip to content

TDBGen: add a workaround for a workaround for async PWT #64973

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
merged 1 commit into from
Apr 7, 2023

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Apr 6, 2023

When a protocol witness thunk is formed to a serialised protocol containing an async function, the async function pointer to the conformance needs to be made public due to a SIL Verifier check failure (reference to a non-fragile function from within a public fragile function). Add a stop-gap solution of rolling an extra emission for a private symbol as a public symbol to avoid the error (the underlying issue has been open for ~6y and counting as of this commit).

This was identified by swift-package-manager (#64900).

Thanks to @DougGregor and @aschwaighofer for the discussion on this!

Backporting this to 5.9 to repair the SPM build. The change is pretty isolated and will add an extra item to the interface definition as per TBDGen's view to match the workaround in IRGen/SILGen related to the protocol conformance of serialised interfaces.


Cherry-pick of #64920.

When a protocol witness thunk is formed to a serialised protocol
containing an `async` function, the async function pointer to the
conformance needs to be made public due to a SIL Verifier check failure
(reference to a non-fragile function from within a public fragile
function).  Add a stop-gap solution of rolling an extra emission for a
private symbol as a public symbol to avoid the error (the underlying
issue has been open for ~6y and counting as of this commit).

This was identified by swift-package-manager (swiftlang#64900).

Thanks to @DougGregor and @aschwaighofer for the discussion on this!
@compnerd compnerd marked this pull request as ready for review April 6, 2023 16:01
@compnerd compnerd requested a review from a team as a code owner April 6, 2023 16:01
@compnerd
Copy link
Member Author

compnerd commented Apr 6, 2023

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Apr 6, 2023

@compnerd compnerd merged commit 564f152 into swiftlang:release/5.9 Apr 7, 2023
@compnerd compnerd deleted the 59-public-privates branch April 7, 2023 17:00
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants