Skip to content

[6.0🍒] prevent uses of Escapable in general #73134

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
Apr 23, 2024

Conversation

kavon
Copy link
Member

@kavon kavon commented Apr 19, 2024

  • Explanation: The Escapable type shouldn't be usable in Swift programs without the NonescapableTypes feature flag, as it hasn't gone through evolution. Yet we cannot remove it as it is the foundation of that feature.
  • Scope: Mildly source-breaking (nobody should have needed to refer to Escapable before, it's basically useless to have done so).
  • Issue: rdar://126705184
  • Original PR: prevent uses of Escapable in general #73133
  • Risk: Low. Might break source if anyone was using this branch and decided they wanted to write useless constraints. The fix is for them to delete Escapable constraints or replace any Escapable with Any.
  • Testing: Tests are included for the banishment of referring to the type.
  • Reviewer: @amartini51

@kavon kavon requested a review from a team as a code owner April 19, 2024 06:05
@kavon
Copy link
Member Author

kavon commented Apr 19, 2024

@swift-ci test

This protocol appears in the stdlib as scaffolding for the
`NonescapableTypes` feature, which is still experimental and not gone
through evolution as an approved addition to the stdlib.

Rather than delete it from the stdlib, because it needs to still remain
to support that feature work, gate references to it behind a feature
flag.

Additionally, prevent documentation from seeing this declaration.

rdar://126705184
(cherry picked from commit f0a69a3)
@kavon kavon force-pushed the 6.0-no-escapable-for-u branch from 5348ee9 to d9aad82 Compare April 23, 2024 03:43
@kavon
Copy link
Member Author

kavon commented Apr 23, 2024

@swift-ci test

@kavon kavon enabled auto-merge April 23, 2024 03:44
@kavon
Copy link
Member Author

kavon commented Apr 23, 2024

@swift-ci test macOS

@kavon
Copy link
Member Author

kavon commented Apr 23, 2024

@swift-ci test linux

@kavon kavon requested review from atrick and amartini51 April 23, 2024 15:39
@amartini51
Copy link
Member

This looks good to me — thanks!

@kavon kavon merged commit db2ab0e into swiftlang:release/6.0 Apr 23, 2024
@kavon kavon deleted the 6.0-no-escapable-for-u branch April 23, 2024 22:07
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