-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up and soft-deprecate AsyncKit (#106)
* Soft-deprecate the package, bump to latest Swift requirement (matching Vapor), clean up CI and DocC docs * Ditch old @available stanzas * Fix the future operators (just 'cause) * Factor out a ton of common code in the tests, reduce imports, set default log level to the now-standard info * Speed up the future queue tests by a lot (no one should be using the darn thing, why should we spend forever testing it?)
- Loading branch information
Showing
39 changed files
with
389 additions
and
652 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
name: test | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
pull_request: { branches: ['*'] } | ||
push: { branches: ['main'] } | ||
pull_request: { types: [opened, reopened, synchronize, ready_for_review] } | ||
push: { branches: [ main ] } | ||
|
||
env: | ||
LOG_LEVEL: info | ||
SWIFT_DETERMINISTIC_HASHING: 1 | ||
|
||
jobs: | ||
unit-tests: | ||
uses: vapor/ci/.github/workflows/run-unit-tests.yml@reusable-workflows | ||
with: | ||
with_coverage: true | ||
with_tsan: true | ||
with_public_api_check: ${{ github.event_name == 'pull_request' }} | ||
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
<p align="center"> | ||
<img | ||
src="https://user-images.githubusercontent.com/1342803/59048834-b2ce3680-8854-11e9-9446-78f5b07cf5fd.png" | ||
height="64" alt="AsyncKit" | ||
> | ||
<br> | ||
<br> | ||
<a href="https://docs.vapor.codes/4.0/"> | ||
<img src="http://img.shields.io/badge/read_the-docs-2196f3.svg" alt="Documentation"> | ||
</a> | ||
<a href="https://discord.gg/vapor"> | ||
<img src="https://img.shields.io/discord/431917998102675485.svg" alt="Team Chat"> | ||
</a> | ||
<a href="https://github.com/vapor/async-kit/blob/main/LICENSE"> | ||
<img src="http://img.shields.io/badge/license-MIT-brightgreen.svg" alt="MIT License"> | ||
</a> | ||
<a href="https://github.com/vapor/async-kit/actions/workflows/test.yml"> | ||
<img src="https://github.com/vapor/async-kit/actions/workflows/test.yml/badge.svg?event=push" alt="CI"> | ||
</a> | ||
<a href="https://codecov.io/github/vapor/async-kit"> | ||
<img src="https://codecov.io/github/vapor/async-kit/branch/main/graph/badge.svg?token=yDzzHja8lt"> | ||
</a> | ||
<a href="https://swift.org"> | ||
<img src="http://img.shields.io/badge/swift-5.6-brightgreen.svg" alt="Swift 5.6"> | ||
</a> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/vapor/async-kit/assets/1130717/4e9050ac-bf8b-4c4d-9d30-51b3d4cbc2e4"> | ||
<source media="(prefers-color-scheme: light)" srcset="https://github.com/vapor/async-kit/assets/1130717/474c4282-bf80-4473-919e-3019925ba530"> | ||
<img src="https://github.com/vapor/async-kit/assets/1130717/474c4282-bf80-4473-919e-3019925ba530" height="96" alt="AsyncKit"> | ||
</picture> | ||
<br> | ||
<br> | ||
<a href="https://docs.vapor.codes/4.0/"><img src="https://design.vapor.codes/images/readthedocs.svg" alt="Documentation"></a> | ||
<a href="https://discord.gg/vapor"><img src="https://design.vapor.codes/images/discordchat.svg" alt="Team Chat"></a> | ||
<a href="LICENSE"><img src="https://design.vapor.codes/images/mitlicense.svg" alt="MIT License"></a> | ||
<a href="https://github.com/vapor/async-kit/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/vapor/async-kit/test.yml?event=push&style=for-the-badge&logo=github&label=test&logoColor=%23ccc" alt="Continuous Integration"></a> | ||
<a href="https://codecov.io/github/vapor/async-kit"><img src="https://img.shields.io/codecov/c/github/vapor/async-kit?style=for-the-badge&logo=codecov&label=Codecov&token=yDzzHja8lt"></a> | ||
<a href="https://swift.org"><img src="https://design.vapor.codes/images/swift57up.svg" alt="Swift 5.7+"></a> | ||
</p> | ||
|
||
<br> | ||
|
||
_**AsyncKit is a legacy package; its use is not recommended in new projects.**_ | ||
|
||
This package provides a set of utilities for working with [EventLoopFuture](https://swiftpackageindex.com/apple/swift-nio/main/documentation/niocore/eventloopfuture)s and other related pre-Concurrency support APIs. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,145 @@ | ||
# ``AsyncKit`` | ||
|
||
AsyncKit provides a number of extensions to both Swift's Concurrency primitives and NIO's futures to make working with them easier. The long-term goal is to migrate away from this package as Swift Concurrency adds support for working in an asynchronous environment easy. | ||
@Metadata { | ||
@TitleHeading(Package) | ||
} | ||
|
||
Provides a set of utilities for working with EventLoopFutures and other pre-Concurrency support APIs. | ||
|
||
## Overview | ||
|
||
More to follow... | ||
_**AsyncKit is a legacy package; its use is not recommended in new projects.**_ | ||
|
||
AsyncKit provides a number of extensions to both Swift's Concurrency primitives and NIO's futures to make working with them easier. The long-term goal is to migrate away from this package as Swift Concurrency adds support for working in an asynchronous environment easy. | ||
|
||
See references below for usage details. | ||
|
||
## Topics | ||
|
||
### Legacy connection pools | ||
|
||
- ``EventLoopConnectionPool`` | ||
- ``EventLoopGroupConnectionPool`` | ||
- ``ConnectionPoolSource`` | ||
- ``ConnectionPoolItem`` | ||
- ``ConnectionPoolError`` | ||
- ``ConnectionPoolTimeoutError`` | ||
|
||
### Optionals | ||
|
||
- ``strictMap(_:_:)`` | ||
- ``strictMap(_:_:_:)`` | ||
- ``strictMap(_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
- ``strictMap(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)`` | ||
|
||
### EventLoop and EventLoopGroup | ||
|
||
- ``NIOCore/EventLoop/flatten(_:)-6gsl5`` | ||
- ``NIOCore/EventLoop/flatten(_:)-7tski`` | ||
- ``NIOCore/EventLoopGroup/future()`` | ||
- ``NIOCore/EventLoopGroup/future(error:)`` | ||
- ``NIOCore/EventLoopGroup/future(_:)`` | ||
- ``NIOCore/EventLoopGroup/future(result:)`` | ||
- ``NIOCore/EventLoopGroup/tryFuture(_:)`` | ||
|
||
### EventLoopFuture | ||
|
||
- ``EventLoopFutureQueue`` | ||
- ``NIOCore/EventLoopFuture/mapEach(_:)-3wa2g`` | ||
- ``NIOCore/EventLoopFuture/mapEach(_:)-9cwjy`` | ||
- ``NIOCore/EventLoopFuture/mapEachCompact(_:)-2vkmo`` | ||
- ``NIOCore/EventLoopFuture/mapEachCompact(_:)-4sfs3`` | ||
- ``NIOCore/EventLoopFuture/mapEachFlat(_:)-9kgfr`` | ||
- ``NIOCore/EventLoopFuture/mapEachFlat(_:)-783z2`` | ||
- ``NIOCore/EventLoopFuture/flatMapEach(on:_:)-9yail`` | ||
- ``NIOCore/EventLoopFuture/flatMapEach(on:_:)-8yhpe`` | ||
- ``NIOCore/EventLoopFuture/flatMapEachCompact(on:_:)`` | ||
- ``NIOCore/EventLoopFuture/flatMapEachThrowing(_:)`` | ||
- ``NIOCore/EventLoopFuture/flatMapEachCompactThrowing(_:)`` | ||
- ``NIOCore/EventLoopFuture/sequencedFlatMapEach(_:)-29ak2`` | ||
- ``NIOCore/EventLoopFuture/sequencedFlatMapEach(_:)-6d82b`` | ||
- ``NIOCore/EventLoopFuture/sequencedFlatMapEachCompact(_:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/whenTheySucceed(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:file:line:)`` | ||
- ``NIOCore/EventLoopFuture/guard(_:else:)`` | ||
- ``NIOCore/EventLoopFuture/flatMapAlways(file:line:_:)`` | ||
- ``NIOCore/EventLoopFuture/nonempty(orError:)`` | ||
- ``NIOCore/EventLoopFuture/nonemptyMap(_:)`` | ||
- ``NIOCore/EventLoopFuture/nonemptyMap(or:_:)`` | ||
- ``NIOCore/EventLoopFuture/nonemptyFlatMapThrowing(_:)`` | ||
- ``NIOCore/EventLoopFuture/nonemptyFlatMapThrowing(or:_:)`` | ||
- ``NIOCore/EventLoopFuture/nonemptyFlatMap(_:)`` | ||
- ``NIOCore/EventLoopFuture/nonemptyFlatMap(or:_:)`` | ||
- ``NIOCore/EventLoopFuture/nonemptyFlatMap(orFlat:_:)`` | ||
- ``NIOCore/EventLoopFuture/optionalMap(_:)`` | ||
- ``NIOCore/EventLoopFuture/optionalFlatMap(_:)-1lhnd`` | ||
- ``NIOCore/EventLoopFuture/optionalFlatMap(_:)-1c1gn`` | ||
- ``NIOCore/EventLoopFuture/optionalFlatMapThrowing(_:)`` | ||
- ``NIOCore/EventLoopFuture/transform(to:)-7agus`` | ||
- ``NIOCore/EventLoopFuture/transform(to:)-3k9qv`` | ||
- ``NIOCore/EventLoopFuture/tryFlatMap(file:line:_:)`` | ||
|
||
### EventLoopFuture operators | ||
|
||
- ``NIOCore/EventLoopFuture/+(_:_:)-48eo2`` | ||
- ``NIOCore/EventLoopFuture/+(_:_:)-78tv8`` | ||
- ``NIOCore/EventLoopFuture/+=(_:_:)-3854m`` | ||
- ``NIOCore/EventLoopFuture/+=(_:_:)-1t7oh`` | ||
<!--- ``NIOCore/EventLoopFuture/-(_:_:)-92wyb``--> | ||
<!--- ``NIOCore/EventLoopFuture/-=(_:_:)-4sy59``--> | ||
<!--- ``NIOCore/EventLoopFuture/-(_:_:)-6djhk``--> | ||
<!--- ``NIOCore/EventLoopFuture/-=(_:_:)-3v817``--> | ||
- ``NIOCore/EventLoopFuture/*(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/*=(_:_:)`` | ||
<!--- ``NIOCore/EventLoopFuture//(_:_:)``--> | ||
<!--- ``NIOCore/EventLoopFuture//=(_:_:)``--> | ||
- ``NIOCore/EventLoopFuture/%(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/%=(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/<(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/<=(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/>(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/>=(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/<<(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/<<=(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/>>(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/>>=(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/&(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/&=(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/|(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/|=(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/^(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/^=(_:_:)`` | ||
- ``NIOCore/EventLoopFuture/~(_:)`` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"theme": { | ||
"aside": { "border-radius": "6px", "border-style": "double", "border-width": "3px" }, | ||
"border-radius": "0", | ||
"button": { "border-radius": "16px", "border-width": "1px", "border-style": "solid" }, | ||
"code": { "border-radius": "16px", "border-width": "1px", "border-style": "solid" }, | ||
"color": { | ||
"asynckit": "#808080", | ||
"documentation-intro-fill": "radial-gradient(circle at top, var(--color-asynckit) 30%, #000 100%)", | ||
"documentation-intro-accent": "var(--color-asynckit)", | ||
"logo-base": { "dark": "#fff", "light": "#000" }, | ||
"logo-shape": { "dark": "#000", "light": "#fff" }, | ||
"fill": { "dark": "#000", "light": "#fff" } | ||
}, | ||
"icons": { "technology": "/asynckit/images/vapor-asynckit-logo.svg" } | ||
}, | ||
"features": { | ||
"quickNavigation": { "enable": true }, | ||
"i18n": { "enable": true } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.