Skip to content

Remove #if compiler(>=5.5) #641

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

Merged
merged 2 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@ Please have a look at [SECURITY.md](SECURITY.md) for AsyncHTTPClient's security

## Supported Versions

The most recent versions of AsyncHTTPClient support Swift 5.5 and newer. The minimum Swift version supported by AsyncHTTPClient releases are detailed below:
The most recent versions of AsyncHTTPClient support Swift 5.5.2 and newer. The minimum Swift version supported by AsyncHTTPClient releases are detailed below:

AsyncHTTPClient | Minimum Swift Version
--------------------|----------------------
`1.0.0 ..< 1.5.0` | 5.0
`1.5.0 ..< 1.10.0` | 5.2
`1.10.0 ..< 1.13.0` | 5.4
`1.13.0 ...` | 5.5
`1.13.0 ...` | 5.5.2
3 changes: 0 additions & 3 deletions Sources/AsyncHTTPClient/AsyncAwait/HTTPClient+execute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//

#if compiler(>=5.5.2) && canImport(_Concurrency)
import struct Foundation.URL
import Logging
import NIOCore
Expand Down Expand Up @@ -215,5 +214,3 @@ private actor TransactionCancelHandler {
}
}
}

#endif
4 changes: 0 additions & 4 deletions Sources/AsyncHTTPClient/AsyncAwait/HTTPClient+shutdown.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

import NIOCore

#if compiler(>=5.5.2) && canImport(_Concurrency)

extension HTTPClient {
/// Shuts down the client and `EventLoopGroup` if it was created by the client.
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
Expand All @@ -32,5 +30,3 @@ extension HTTPClient {
}
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//

#if compiler(>=5.5.2) && canImport(_Concurrency)
import struct Foundation.URL
import NIOCore
import NIOHTTP1
Expand Down Expand Up @@ -122,5 +121,3 @@ extension HTTPClientRequest {
return newRequest
}
}

#endif
3 changes: 0 additions & 3 deletions Sources/AsyncHTTPClient/AsyncAwait/HTTPClientRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//

#if compiler(>=5.5.2) && canImport(_Concurrency)
import NIOCore
import NIOHTTP1

Expand Down Expand Up @@ -424,5 +423,3 @@ extension HTTPClientRequest.Body {
internal var storage: RequestBodyLength
}
}

#endif
3 changes: 0 additions & 3 deletions Sources/AsyncHTTPClient/AsyncAwait/HTTPClientResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//

#if compiler(>=5.5.2) && canImport(_Concurrency)
import NIOCore
import NIOHTTP1

Expand Down Expand Up @@ -154,5 +153,3 @@ extension HTTPClientResponse.Body {
.stream(CollectionOfOne(byteBuffer).async)
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
#if compiler(>=5.5.2) && canImport(_Concurrency)

import Logging
import NIOCore
import NIOHTTP1
Expand Down Expand Up @@ -765,5 +765,3 @@ extension Transaction {
}
}
}

#endif
2 changes: 0 additions & 2 deletions Sources/AsyncHTTPClient/AsyncAwait/Transaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//

#if compiler(>=5.5.2) && canImport(_Concurrency)
import Logging
import NIOConcurrencyHelpers
import NIOCore
Expand Down Expand Up @@ -362,4 +361,3 @@ extension Transaction {
self.performFailAction(action)
}
}
#endif
2 changes: 0 additions & 2 deletions Sources/AsyncHTTPClient/HTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -904,10 +904,8 @@ extension HTTPClient.EventLoopGroupProvider: Sendable {}
extension HTTPClient.EventLoopPreference: Sendable {}
#endif

#if swift(>=5.5) && canImport(_Concurrency)
// HTTPClient is thread-safe because its shared mutable state is protected through a lock
extension HTTPClient: @unchecked Sendable {}
#endif

extension HTTPClient.Configuration {
/// Timeout configuration.
Expand Down
2 changes: 0 additions & 2 deletions Sources/AsyncHTTPClient/HTTPHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,7 @@ extension HTTPClient {
}
}

#if swift(>=5.5) && canImport(_Concurrency)
extension HTTPClient.Task: @unchecked Sendable {}
#endif

internal struct TaskCancelEvent {}

Expand Down
2 changes: 0 additions & 2 deletions Sources/AsyncHTTPClient/SSLContextCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,4 @@ extension SSLContextCache {
}
}

#if swift(>=5.5) && canImport(_Concurrency)
extension SSLContextCache: @unchecked Sendable {}
#endif
2 changes: 0 additions & 2 deletions Sources/AsyncHTTPClient/UnsafeTransfer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ final class UnsafeMutableTransferBox<Wrapped> {
}
}

#if swift(>=5.5) && canImport(_Concurrency)
extension UnsafeMutableTransferBox: @unchecked Sendable {}
#endif
Loading