Skip to content

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