Skip to content

[5.7] SILGen: Don't reference external property descriptors for @_alwaysEmitIntoClient properties. #59214

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
Jun 2, 2022

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Jun 2, 2022

Their definition is fully visible to clients to be copied into them, and there isn't necessarily
a symbol for the property descriptor in the defining module, so it isn't necessary or desirable to
try to use a property descriptor with them. Trying to reference the descriptor leads to missing
symbol errors at load time when trying to use keypaths with older versions of the defining dylib,
which goes against the purpose of @_alwaysEmitIntoClient meaning "no ABI liabilities for the
defining module". Fixes rdar://94049160.

…tIntoClient properties.

Their definition is fully visible to clients to be copied into them, and there isn't necessarily
a symbol for the property descriptor in the defining module, so it isn't necessary or desirable to
try to use a property descriptor with them. Trying to reference the descriptor leads to missing
symbol errors at load time when trying to use keypaths with older versions of the defining dylib,
which goes against the purpose of `@_alwaysEmitIntoClient` meaning "no ABI liabilities for the
defining module". Fixes rdar://94049160.
@jckarter jckarter requested a review from a team as a code owner June 2, 2022 00:12
@jckarter
Copy link
Contributor Author

jckarter commented Jun 2, 2022

@swift-ci Please test

@jckarter jckarter merged commit c6c60ab into swiftlang:release/5.7 Jun 2, 2022
tshortli added a commit to tshortli/swift that referenced this pull request Aug 17, 2023
…ed properties.

The property descriptors of `@backDeployed` properties aren't available on OSes
prior to the "back deployed before" OS version, so the descriptors cannot be
referenced by clients that may run against older versions of the library
that defines the property.

See swiftlang#59214 for prior art.

Resolves rdar://106517386
tshortli added a commit to tshortli/swift that referenced this pull request Aug 17, 2023
…ed properties.

The property descriptors of `@backDeployed` properties aren't available on OSes
prior to the "back deployed before" OS version, so the descriptors cannot be
referenced by clients that may run against older versions of the library
that defines the property.

See swiftlang#59214 for prior art.

Resolves rdar://106517386
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