Skip to content

SILGen: Don't reference external property descriptors for @backDeployed properties #67982

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
Aug 17, 2023

Conversation

tshortli
Copy link
Contributor

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 #59214 for prior art.

Resolves rdar://106517386

…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 tshortli requested a review from jckarter August 17, 2023 06:28
@tshortli
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@jckarter jckarter left a comment

Choose a reason for hiding this comment

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

Since the current Swift runtime doesn't properly check for a weak-linked external property descriptor, this looks good for now. For future runtimes, it would be good to also fix the runtime so we can still use the weak-linked property descriptor in case the API does evolve beyond what the back-deployed implementation provides. But we'd still only be able to take advantage of that on newer OSes, so we'd still need to fall back to the behavior you have implemented here for current and older OS deployment targets.

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.

2 participants