Skip to content

[5.8] Sema: Lift restriction requiring decls with @_backDeploy to have explicit availability #62895

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

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Jan 6, 2023

Cherry pick of #62876

Swift Evolution has concluded that it is inappropriate to require decls with @_backDeploy to also have explicit availability. Lift the restriction and assume declarations with no explicit availability are back deployed as far as possible.

Lifting a simultaneous attribute restriction sounds like it should be an easy task, but that was not the case here. The diagnostics for availability conflicts with the back deployment before: version were greatly simplified by the assumption that an explicit @available attribute would be present. With the removal of the restriction the implementation of the diagnostics had to be enhanced to look for both inherited availability and unavailability.

Additionally, this PR fixes a bug that would have caused the wrong @_backDeploy attribute to be used when attributes for both iOS and macCatalyst are present.

Resolves rdar://103880356

@tshortli tshortli added the r5.8 label Jan 6, 2023
@tshortli
Copy link
Contributor Author

tshortli commented Jan 6, 2023

@swift-ci please test

@tshortli tshortli requested a review from nkcsgexi January 6, 2023 22:33
@tshortli tshortli changed the title [5.8] Sema: Lift restriction requiring decls with @_backDeploy to have explicit availability [5.8] Sema: Lift restriction requiring decls with @_backDeploy to have explicit availability Jan 6, 2023
@tshortli tshortli merged commit 6e84f8a into swiftlang:release/5.8 Jan 7, 2023
@tshortli tshortli deleted the remove-back-deploy-available-attr-requirement-5.8 branch January 7, 2023 05:04
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.8 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants