Skip to content

Compatibility51: Backport the 5.2 implementation of the conformance cache. #31256

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 24, 2020

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Apr 24, 2020

The runtime that shipped with Swift 5.1 and earlier had a bug that interfered with backward
deployment of binaries that dynamically check for protocol conformances on conditionally-available tests. This was fixed in the top-of-tree Swift runtime by #29887; however, that doesn't do much good for running binaries on older OSes that don't have that fix. In order for binaries built with a newer Swift compiler to run successfully on older OSes, introduce a compatibility hook that replaces the conformance cache implementation in the original OS runtime with a version based on the current implementation that has the fix for the protocol conformance bug. Fixes rdar://problem/59460603

@jckarter jckarter requested a review from slavapestov April 24, 2020 01:18
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter requested a review from mikeash April 24, 2020 01:18
Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

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

Looks great, well done! A few bikeshedding comments, but that's all.

…ache.

The runtime that shipped with Swift 5.1 and earlier had a bug that interfered with backward
deployment of binaries that dynamically check for protocol conformances on conditionally-available
tests. This was fixed in the top-of-tree Swift runtime by swiftlang#29887;
however, that doesn't do much good for running binaries on older OSes that don't have that fix.
In order for binaries built with a newer Swift compiler to run successfully on older OSes,
introduce a compatibility hook that replaces the conformance cache implementation in the original
OS runtime with a version based on the current implementation that has the fix for the protocol
conformance bug. Fixes rdar://problem/59460603
@jckarter jckarter force-pushed the backport-conformance-cache-51 branch from fcb7997 to ca48939 Compare April 24, 2020 17:52
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - fcb7997b05e5c3a3dd6a70689beb46980a302bac

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - fcb7997b05e5c3a3dd6a70689beb46980a302bac

@jckarter jckarter merged commit de2a8b7 into swiftlang:master Apr 24, 2020
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