Motivation:
6.0.3 added new warnings about Sendable issues, so let's fix those to
keep things warnings free.
Modifications:
A bunch of Sendable usage fixes.
Result:
Warnings free builds again!
* Apply formatting
* Apply no block comments rule
* Apply OmitExplicitReturns
* Apple OnlyOneTrailingClosureArgument
* Apply NoAssignmentInExpressions
* Fix up DontRepeatTypeInStaticProperties lint errors
* Apply `OrderedImports`
* Apply `ReplaceForEachWithForLoop`
* format file
* Enable the formatting pipeline
* Adopt `AmbiguousTrailingClosureOverload`
* Fix license header
* Fix format check
* Fix `EndOfLineComment`
* Fix CI
* Adapt CI script to check if changes when running formatting
* Separate lint and format into to steps
* Fix format
* Adopt `UseEarlyExits`
* Revert "Adopt `UseEarlyExits`"
This reverts commit d1ac5bbe12.
* Change Swift Concurrency Availability
* Label GitHub Action Jobs
* Incorporate the insights from Johannes Weiss
* Remove GitHub Actions
* Incorporate the feedback of Cory Benfield
Co-authored-by: Cory Benfield <lukasa@apple.com>
Motivation:
Swift 5.5 provides concurrency support on almost all platforms where it
is available. However, the Xcode 13 GM currently provides a macOS 11 SDK
with Swift 5.5, and the concurrency features are not available in that
SDK. As a result, NIO's concurrency features cause compile errors when
building the concurrency library on macOS using Xcode 13 GM.
Modifications:
- Only build the concurrency features when the concurrency library is
present.
Result:
We can build NIO using Xcode 13 GM.
- Use correct @available checks in `NIOAsyncAwaitDemo` (post WWDC '21)
- Remove `import _Concurrency` statements
Result:
- Cleaner imports
- static-stdlib linking works again on 5.5 (it does not if we explicitly `import _Concurrency`)
Co-authored-by: George Barnett <gbarnett@apple.com>
Motivation:
As we've largely completed our move to split out our core abstractions,
we now have an opportunity to clean up our dependencies and imports. We
should arrange for everything to only import NIO if it actually needs
it, and to correctly express dependencies on NIOCore and NIOEmbedded
where they exist.
We aren't yet splitting out tests that only test functionality in
NIOCore, that will follow in a separate patch.
Modifications:
- Fixed up imports
- Made sure our protocols only require NIOCore.
Result:
Better expression of dependencies.
Co-authored-by: George Barnett <gbarnett@apple.com>
Motivation:
On Swift's main branch Task.runDetached has been renamed to detach.
Modifications:
Adopt the new spelling.
Result:
Compiles again on the main nightlies.
Motivation:
The async/await proposal has entered the review phase, so we may want to
start looking into NIO with async/await.
Modifications:
- Add `EventLoopFuture.get() throws await`
- Add `ChannelOutboundInvoker` `async` methods
Result:
If async/await were actually implemented, you could use NIO together
with async/wait. So far, you can only compile your projects.