-
Notifications
You must be signed in to change notification settings - Fork 10.6k
SE-0340: noasync
availability kind
#40769
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
SE-0340: noasync
availability kind
#40769
Conversation
fa40b95
to
02c7937
Compare
@swift-ci please test |
02c7937
to
9b45efe
Compare
@swift-ci please test |
9b45efe
to
aa599f8
Compare
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test macOS |
Build failed |
574d89f
to
5af171c
Compare
@swift-ci please test macOS |
@swift-ci please test Linux |
@swift-ci please test Windows |
@swift-ci please test |
2e18a14
to
79b13c3
Compare
@swift-ci please test |
@swift-ci please test Linux |
@swift-ci please clean test macOS |
@swift-ci please test macOS |
79b13c3
to
1103c2e
Compare
noasync
availability kindnoasync
availability kind
@swift-ci please test |
1103c2e
to
ff82f09
Compare
@swift-ci please test |
ff82f09
to
10bb414
Compare
@swift-ci please test |
10bb414
to
007ba0a
Compare
This patch adds the `noasync` availability kind to `@available`. The spelling is `@available(*, noasync)`.
This patch adds validation to ensure that the noasync attribute is only applied to useful declarations. Specifically, the `noasync` attribute cannot be applied to `deinit` declarations, asynchronous functions, or asynchronous properties.
Needed to add availability information for macOS, iOS, and watchOS to avoid emitting unintended errors on the `async` keyword.
Verify importing noasync across modules works correctly.
007ba0a
to
aa22e79
Compare
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fantastic!
Add
noasync
availability kind to the@available
attribute. This is moving the checking from the@_unavailableFromAsync
attribute over to availability checking. There are additional features here including handling unavailability on different platforms, a message, and renaming function calls.This implements SE-0340 Swift noasync.