From 985a485f71792ca507b17730dd2081f843aea6eb Mon Sep 17 00:00:00 2001 From: David Nadoba Date: Thu, 13 Oct 2022 14:04:27 +0100 Subject: [PATCH 1/2] Remove `#if compiler(>=5.5)` (#182) --- README.md | 6 +++--- Sources/NIOExtras/QuiescingHelper.swift | 5 +---- Sources/NIOExtras/WritePCAPHandler.swift | 6 +----- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a1ac4a7..6326098 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ All code will go through code review like in the other repositories related to t `swift-nio-extras` part of the SwiftNIO 2 family of repositories and depends on the following: - [`swift-nio`](https://github.com/apple/swift-nio), version 2.30.0 or better. -- Swift 5.5. +- Swift 5.5.2. - `zlib` and its development headers installed on the system. But don't worry, you'll find `zlib` on pretty much any UNIX system that can compile any sort of code. To depend on `swift-nio-extras`, put the following in the `dependencies` of your `Package.swift`: @@ -25,14 +25,14 @@ To depend on `swift-nio-extras`, put the following in the `dependencies` of your ### Support for older Swift versions -The most recent versions of SwiftNIO Extras support Swift 5.5 and newer. The minimum Swift version supported by SwiftNIO Extras releases are detailed below: +The most recent versions of SwiftNIO Extras support Swift 5.5.2 and newer. The minimum Swift version supported by SwiftNIO Extras releases are detailed below: SwiftNIO Extras | Minimum Swift Version --------------------|---------------------- `1.0.0 ..< 1.10.0` | 5.0 `1.10.0 ..< 1.11.0` | 5.2 `1.11.0 ..< 1.14.0` | 5.4 -`1.14.0 ...` | 5.5 +`1.14.0 ...` | 5.5.2 On the [`nio-extras-0.1`](https://github.com/apple/swift-nio-extras/tree/nio-extras-0.1) branch, you can find the `swift-nio-extras` version for the SwiftNIO 1 family. It requires Swift 4.1 or better. diff --git a/Sources/NIOExtras/QuiescingHelper.swift b/Sources/NIOExtras/QuiescingHelper.swift index ea1ffec..882ec9b 100644 --- a/Sources/NIOExtras/QuiescingHelper.swift +++ b/Sources/NIOExtras/QuiescingHelper.swift @@ -144,11 +144,8 @@ private final class ChannelCollector { } } -#if swift(>=5.5) && canImport(_Concurrency) -extension ChannelCollector: @unchecked Sendable { -} -#endif +extension ChannelCollector: @unchecked Sendable {} /// A `ChannelHandler` that adds all channels that it receives through the `ChannelPipeline` to a `ChannelCollector`. /// diff --git a/Sources/NIOExtras/WritePCAPHandler.swift b/Sources/NIOExtras/WritePCAPHandler.swift index 70b6d8e..23a3e9a 100644 --- a/Sources/NIOExtras/WritePCAPHandler.swift +++ b/Sources/NIOExtras/WritePCAPHandler.swift @@ -722,8 +722,4 @@ extension NIOWritePCAPHandler { } } -#if swift(>=5.5) && canImport(_Concurrency) -extension NIOWritePCAPHandler.SynchronizedFileSink: @unchecked Sendable { - -} -#endif +extension NIOWritePCAPHandler.SynchronizedFileSink: @unchecked Sendable {} From e9ed606ce31d134777acd64ba3e2c23a243ddb23 Mon Sep 17 00:00:00 2001 From: David Nadoba Date: Thu, 13 Oct 2022 14:17:37 +0100 Subject: [PATCH 2/2] Fix README.md (#183) I have accidentally added an additional dot in https://github.com/apple/swift-nio-extras/pull/182 This PR removes it again. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6326098..cde7236 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ All code will go through code review like in the other repositories related to t `swift-nio-extras` part of the SwiftNIO 2 family of repositories and depends on the following: - [`swift-nio`](https://github.com/apple/swift-nio), version 2.30.0 or better. -- Swift 5.5.2. +- Swift 5.5.2 - `zlib` and its development headers installed on the system. But don't worry, you'll find `zlib` on pretty much any UNIX system that can compile any sort of code. To depend on `swift-nio-extras`, put the following in the `dependencies` of your `Package.swift`: