Skip to content

[5.9] SILGen: Don't reference external property descriptors for @backDeployed properties #67991

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 18, 2023

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Aug 17, 2023

  • Explanation: Apps that form key paths to properties declared with the @backDeployed attribute would crash at runtime when running on older OSes. 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.
  • Scope: This change narrowly affects codegen for key path expressions formed on properties with a @backDeployed attribute.
  • Risk: Low because the scope of the change is low. Properties with @backDeployed are not common and apps forming these references were already broken when running on older OSes.
  • Testing: Integration test suite for @backDeployed was updated to include a test case that reproduces the issue.
  • Issues: rdar://106517386
  • Reviewer: @jckarter
  • Main branch PR: SILGen: Don't reference external property descriptors for @backDeployed properties #67982

…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
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli marked this pull request as ready for review August 17, 2023 21:14
@tshortli tshortli requested a review from a team as a code owner August 17, 2023 21:14
@tshortli tshortli requested a review from nkcsgexi August 17, 2023 21:14
@tshortli tshortli merged commit ebed23d into swiftlang:release/5.9 Aug 18, 2023
@tshortli tshortli deleted the back-deployed-keypaths-5.9 branch August 18, 2023 04:23
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