Skip to content

Conversation

etcwilde
Copy link
Member

@etcwilde etcwilde commented Jan 7, 2022

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.

@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch 2 times, most recently from fa40b95 to 02c7937 Compare January 13, 2022 20:25
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch from 02c7937 to 9b45efe Compare January 13, 2022 20:36
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch from 9b45efe to aa599f8 Compare January 13, 2022 21:55
@etcwilde
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - aa599f898e90f5d22e8c9b65e5da6ffe30c69d24

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - aa599f898e90f5d22e8c9b65e5da6ffe30c69d24

@etcwilde
Copy link
Member Author

@swift-ci please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 574d89f01ae1046096b4ef1a9f5f74f140353550

@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch from 574d89f to 5af171c Compare January 14, 2022 22:00
@etcwilde
Copy link
Member Author

@swift-ci please test macOS

@etcwilde
Copy link
Member Author

@swift-ci please test Linux

@etcwilde
Copy link
Member Author

@swift-ci please test Windows

@etcwilde
Copy link
Member Author

etcwilde commented Mar 4, 2022

@swift-ci please test

@etcwilde etcwilde marked this pull request as ready for review March 4, 2022 00:32
@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch 2 times, most recently from 2e18a14 to 79b13c3 Compare March 15, 2022 00:31
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde
Copy link
Member Author

@swift-ci please test Linux

@etcwilde
Copy link
Member Author

@swift-ci please clean test macOS

@etcwilde
Copy link
Member Author

@swift-ci please test macOS

@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch from 79b13c3 to 1103c2e Compare March 15, 2022 18:49
@etcwilde etcwilde changed the title noasync availability kind SE-0340: noasync availability kind Mar 15, 2022
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde requested a review from DougGregor March 15, 2022 23:37
@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch from 1103c2e to ff82f09 Compare March 22, 2022 19:05
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde added the concurrency Feature: umbrella label for concurrency language features label Mar 22, 2022
@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch from ff82f09 to 10bb414 Compare March 22, 2022 21:59
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch from 10bb414 to 007ba0a Compare March 22, 2022 22:05
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.
@etcwilde etcwilde force-pushed the ewilde/noasync-unavailability branch from 007ba0a to aa22e79 Compare March 22, 2022 22:13
@etcwilde
Copy link
Member Author

@swift-ci please test

Copy link
Member

@DougGregor DougGregor 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 fantastic!

@etcwilde etcwilde merged commit 13c71c6 into swiftlang:main Mar 23, 2022
@etcwilde etcwilde deleted the ewilde/noasync-unavailability branch March 23, 2022 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

concurrency Feature: umbrella label for concurrency language features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants