Skip to content

Conversation

@tshortli
Copy link
Contributor

@tshortli tshortli commented Jan 6, 2023

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 requested review from artemcm, nkcsgexi and xymus January 6, 2023 02:26
Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

Thanks! Makes sense to me.

@tshortli tshortli force-pushed the remove-back-deploy-available-attr-requirement branch from 640c9b0 to 8e46b76 Compare January 6, 2023 16:18
@tshortli
Copy link
Contributor Author

tshortli commented Jan 6, 2023

@swift-ci please test

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

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

This looks great.

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