mirror of
https://github.com/apple/swift-nio-transport-services
synced 2026-11-22 04:30:44 +00:00
Drop Swift 5.10 (#247)
Co-authored-by: George Barnett <gbarnett@apple.com>
This commit is contained in:
1 parent
c858999595
commit
60c3e18715
7 files changed
+26
-24
No files matched your search
@@ -14,7 +14,6 @@ jobs:
|
||||
name: Unit tests
|
||||
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
|
||||
with:
|
||||
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
|
||||
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
|
||||
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
|
||||
linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
|
||||
|
||||
@@ -17,7 +17,6 @@ jobs:
|
||||
name: Unit tests
|
||||
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
|
||||
with:
|
||||
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
|
||||
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
|
||||
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
|
||||
linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
|
||||
|
||||
+1
-5
@@ -1,4 +1,4 @@
|
||||
// swift-tools-version:5.10
|
||||
// swift-tools-version:6.0
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the SwiftNIO open source project
|
||||
@@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false
|
||||
|
||||
let strictConcurrencySettings: [SwiftSetting] = {
|
||||
var initialSettings: [SwiftSetting] = []
|
||||
initialSettings.append(contentsOf: [
|
||||
.enableUpcomingFeature("StrictConcurrency"),
|
||||
.enableUpcomingFeature("InferSendableFromCaptures"),
|
||||
])
|
||||
|
||||
if strictConcurrencyDevelopment {
|
||||
// -warnings-as-errors here is a workaround so that IDE-based development can
|
||||
|
||||
@@ -54,17 +54,19 @@ To depend on `swift-nio-transport-services `, put the following in the `dependen
|
||||
|
||||
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.0.0"),
|
||||
|
||||
The most recent versions of SwiftNIO Transport Services support Swift 5.7 and newer. The minimum Swift version supported by SwiftNIO Transport Services releases are detailed below:
|
||||
The most recent versions of SwiftNIO Transport Services support Swift 6.0 and newer. The minimum Swift version supported by SwiftNIO Transport Services releases are detailed below:
|
||||
|
||||
SwiftNIO Extras | Minimum Swift Version
|
||||
--------------------|----------------------
|
||||
`1.0.0 ..< 1.11.0` | 5.0
|
||||
`1.11.0 ..< 1.12.0` | 5.2
|
||||
`1.12.0 ..< 1.15.0` | 5.4
|
||||
`1.15.0 ..< 1.17.0` | 5.5.2
|
||||
`1.17.0 ..< 1.19.0` | 5.6
|
||||
`1.19.0 ..< 1.21.0` | 5.7
|
||||
`1.21.0 ...` | 5.8
|
||||
SwiftNIO Transport Services | Minimum Swift Version
|
||||
----------------------------|----------------------
|
||||
`1.0.0 ..< 1.11.0` | 5.0
|
||||
`1.11.0 ..< 1.12.0` | 5.2
|
||||
`1.12.0 ..< 1.15.0` | 5.4
|
||||
`1.15.0 ..< 1.17.0` | 5.5.2
|
||||
`1.17.0 ..< 1.19.0` | 5.6
|
||||
`1.19.0 ..< 1.21.0` | 5.7
|
||||
`1.21.0 ..< 1.25.0` | 5.8
|
||||
`1.25.0 ..< 1.26.0` | 5.10
|
||||
`1.26.0 ...` | 6.0
|
||||
|
||||
### `swift-nio-transport-services ` 0.x
|
||||
|
||||
|
||||
@@ -65,7 +65,9 @@ struct NIOTSEchoClient {
|
||||
// Use the connected-UDP bootstrap (aka NIOTSDatagramBootstrap via typealias).
|
||||
let bootstrap = NIOTSDatagramConnectionBootstrap(group: group)
|
||||
.channelInitializer { channel in
|
||||
channel.pipeline.addHandler(EchoHandler())
|
||||
channel.eventLoop.makeCompletedFuture {
|
||||
try channel.pipeline.syncOperations.addHandler(EchoHandler())
|
||||
}
|
||||
}
|
||||
|
||||
let channel = try bootstrap.connect(host: host, port: port).wait()
|
||||
|
||||
@@ -64,8 +64,9 @@ if #available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) {
|
||||
.channelOption(ChannelOptions.socket(IPPROTO_TCP, TCP_NODELAY), value: 1)
|
||||
.tlsOptions(NWProtocolTLS.Options())
|
||||
.channelInitializer { channel in
|
||||
channel.pipeline.addHTTPClientHandlers().flatMap {
|
||||
channel.pipeline.addHandler(HTTP1ClientHandler())
|
||||
channel.eventLoop.makeCompletedFuture {
|
||||
try channel.pipeline.syncOperations.addHTTPClientHandlers()
|
||||
try channel.pipeline.syncOperations.addHandler(HTTP1ClientHandler())
|
||||
}
|
||||
}.connect(host: "httpbin.org", port: 443).wait()
|
||||
|
||||
|
||||
@@ -41,10 +41,13 @@ if #available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) {
|
||||
let group = NIOTSEventLoopGroup()
|
||||
let channel = try! NIOTSListenerBootstrap(group: group)
|
||||
.childChannelInitializer { channel in
|
||||
channel.pipeline.configureHTTPServerPipeline(withPipeliningAssistance: true, withErrorHandling: true)
|
||||
.flatMap {
|
||||
channel.pipeline.addHandler(HTTP1ServerHandler())
|
||||
}
|
||||
channel.eventLoop.makeCompletedFuture {
|
||||
try channel.pipeline.syncOperations.configureHTTPServerPipeline(
|
||||
withPipeliningAssistance: true,
|
||||
withErrorHandling: true
|
||||
)
|
||||
try channel.pipeline.syncOperations.addHandler(HTTP1ServerHandler())
|
||||
}
|
||||
}.bind(host: "127.0.0.1", port: 8888).wait()
|
||||
|
||||
print("Server listening on \(channel.localAddress!)")
|
||||
|
||||
Reference in new issue
Block a user