Skip to content

[5.1] [Serialization] Teach serialization to get a generic signature from opaque types #27119

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

harlanhaskins
Copy link
Contributor

@harlanhaskins harlanhaskins commented Sep 11, 2019

Description: Fixes incorrect serialization of opaque return types for @inlinable code, and teaches serialization how to deserialize a generic signature from an opaque result type.

Scope of the issue: This prevents returning opaque result types from some @inlinable declarations when in incremental mode

Risk: Low, the patch ensures we start a cross-reference correctly regardless if the return type of a function is an opaque return type, and that we're able to deserialize it

Testing: Manually compiling projects using SwiftUI with @inlinable declarations and CI testing of reduced reproduction cases.

Reviewed-by: @jckarter

Radar: rdar://53958358

@harlanhaskins harlanhaskins requested a review from a team as a code owner September 11, 2019 17:17
@harlanhaskins
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - dd0db3b8976b1d334400ab13b6e219f4e7eadeee

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - dd0db3b8976b1d334400ab13b6e219f4e7eadeee

@harlanhaskins harlanhaskins changed the title [Serialization] Teach serialization to get a generic signature from opaque types [5.1] [Serialization] Teach serialization to get a generic signature from opaque types Sep 11, 2019
Harlan Haskins added 2 commits September 11, 2019 15:43
…YPE_PATH_PIECE

We might have an opaque return type path piece after a generic type
param type, so make sure to emit the XREF entry before the opaque return
type path piece as well.

Fixes rdar://53958358
…paque types

Previously, if we had an XREF to an opaque type, we would fail trying to
get the generic signature from that type.

Fixes rdar://53958358
@harlanhaskins
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - dd0db3b8976b1d334400ab13b6e219f4e7eadeee

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - dd0db3b8976b1d334400ab13b6e219f4e7eadeee

@harlanhaskins
Copy link
Contributor Author

@swift-ci please nominate

@harlanhaskins
Copy link
Contributor Author

@tkremenek Looks like we never got this in. Can you approve this PR as well? (We pulled PR #27141 into swift-5.1-branch-08-28-2019)

@harlanhaskins
Copy link
Contributor Author

@tkremenek Ping

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.

3 participants