Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
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"
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
# Workaround https://github.com/nektos/act/issues/1875
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
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"
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
Expand Down
2 changes: 1 addition & 1 deletion Benchmarks/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:5.10

import PackageDescription

Expand Down

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions Benchmarks/Thresholds/5.9/NIOPosixBenchmarks.TCPEcho.p90.json

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.7
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
//===----------------------------------------------------------------------===//
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.7
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
//===----------------------------------------------------------------------===//
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.7
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
//===----------------------------------------------------------------------===//
//
Expand Down
59 changes: 0 additions & 59 deletions IntegrationTests/tests_04_performance/Thresholds/5.9.json

This file was deleted.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:5.10
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ SwiftNIO | Minimum Swift Version
`2.51.0 ..< 2.60.0` | 5.6
`2.60.0 ..< 2.65.0` | 5.7
`2.65.0 ..< 2.76.0` | 5.8
`2.76.0 ...` | 5.9
`2.76.0 ..<` | 5.9 **TODO:** Update version table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be 2.83.0.


### SwiftNIO 1
SwiftNIO 1 is considered end of life - it is strongly recommended that you move to a newer version. The Core NIO team does not actively work on this version. No new features will be added to this version but PRs which fix bugs or security vulnerabilities will be accepted until the end of May 2022.
Expand Down
6 changes: 0 additions & 6 deletions Sources/NIOEmbedded/AsyncTestingChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,9 @@ public final class NIOAsyncTestingChannel: Channel {

// These two variables are only written once, from a single thread, and never written again, so they're _technically_ thread-safe. Most methods cannot safely
// be used from multiple threads, but `isActive`, `isOpen`, `eventLoop`, and `closeFuture` can all safely be used from any thread. Just.
#if compiler(>=5.10)
@usableFromInline
nonisolated(unsafe) var channelcore: EmbeddedChannelCore!
nonisolated(unsafe) private var _pipeline: ChannelPipeline!
#else
@usableFromInline
var channelcore: EmbeddedChannelCore!
private var _pipeline: ChannelPipeline!
#endif

private struct State {
var isWritable: Bool
Expand Down
2 changes: 0 additions & 2 deletions Sources/NIOHTTP1/HTTPTypedPipelineSetup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
#if !canImport(Darwin) || swift(>=5.10)
import NIOCore

// MARK: - Server pipeline configuration
Expand Down Expand Up @@ -249,4 +248,3 @@ extension ChannelPipeline.SynchronousOperations {
return upgrader.upgradeResultFuture
}
}
#endif
3 changes: 0 additions & 3 deletions Sources/NIOHTTP1/NIOTypedHTTPClientUpgradeHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
#if !canImport(Darwin) || swift(>=5.10)
import NIOCore

/// An object that implements `NIOTypedHTTPClientProtocolUpgrader` knows how to handle HTTP upgrade to
Expand Down Expand Up @@ -296,5 +295,3 @@ public final class NIOTypedHTTPClientUpgradeHandler<UpgradeResult: Sendable>: Ch

@available(*, unavailable)
extension NIOTypedHTTPClientUpgradeHandler: Sendable {}

#endif
2 changes: 0 additions & 2 deletions Sources/NIOHTTP1/NIOTypedHTTPClientUpgraderStateMachine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
#if !canImport(Darwin) || swift(>=5.10)
import DequeModule
import NIOCore

Expand Down Expand Up @@ -334,4 +333,3 @@ struct NIOTypedHTTPClientUpgraderStateMachine<UpgradeResult> {
}
}
}
#endif
3 changes: 0 additions & 3 deletions Sources/NIOHTTP1/NIOTypedHTTPServerUpgradeHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
#if !canImport(Darwin) || swift(>=5.10)
import NIOCore

/// An object that implements `NIOTypedHTTPServerProtocolUpgrader` knows how to handle HTTP upgrade to
Expand Down Expand Up @@ -455,5 +454,3 @@ public final class NIOTypedHTTPServerUpgradeHandler<UpgradeResult: Sendable>: Ch

@available(*, unavailable)
extension NIOTypedHTTPServerUpgradeHandler: Sendable {}

#endif
2 changes: 0 additions & 2 deletions Sources/NIOHTTP1/NIOTypedHTTPServerUpgraderStateMachine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
#if !canImport(Darwin) || swift(>=5.10)
import DequeModule
import NIOCore

Expand Down Expand Up @@ -457,4 +456,3 @@ struct NIOTypedHTTPServerUpgraderStateMachine<UpgradeResult> {
}

}
#endif
2 changes: 0 additions & 2 deletions Sources/NIOPosix/SelectableEventLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,12 @@ internal final class SelectableEventLoop: EventLoop, @unchecked Sendable {
switch task {
case .function(let function):
function()
#if compiler(>=5.9)
case .unownedJob(let erasedUnownedJob):
if #available(macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0, *) {
erasedUnownedJob.unownedJob.runSynchronously(on: self.asUnownedSerialExecutor())
} else {
fatalError("Tried to run an UnownedJob without runtime support")
}
#endif
case .callback(let handler):
handler.handleScheduledCallback(eventLoop: self)
}
Expand Down
2 changes: 0 additions & 2 deletions Sources/NIOWebSocket/NIOWebSocketClientUpgrader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public final class NIOWebSocketClientUpgrader: NIOHTTPClientProtocolUpgrader, Se
}
}

#if !canImport(Darwin) || swift(>=5.10)
/// A `NIOTypedHTTPClientProtocolUpgrader` that knows how to do the WebSocket upgrade dance.
///
/// This upgrader assumes that the `HTTPClientUpgradeHandler` will create and send the upgrade request.
Expand Down Expand Up @@ -129,7 +128,6 @@ public final class NIOTypedWebSocketClientUpgrader<UpgradeResult: Sendable>: NIO
)
}
}
#endif

@available(*, unavailable)
extension NIOWebSocketClientUpgrader: Sendable {}
Expand Down
2 changes: 0 additions & 2 deletions Sources/NIOWebSocket/NIOWebSocketServerUpgrader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ public final class NIOWebSocketServerUpgrader: HTTPServerProtocolUpgrader, Senda
}
}

#if !canImport(Darwin) || swift(>=5.10)
/// A `NIOTypedHTTPServerProtocolUpgrader` that knows how to do the WebSocket upgrade dance.
///
/// Users may frequently want to offer multiple websocket endpoints on the same port. For this
Expand Down Expand Up @@ -265,7 +264,6 @@ public final class NIOTypedWebSocketServerUpgrader<UpgradeResult: Sendable>: NIO
)
}
}
#endif

private func _buildUpgradeResponse(
channel: Channel,
Expand Down
12 changes: 1 addition & 11 deletions Sources/NIOWebSocketClient/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
//
//===----------------------------------------------------------------------===//

#if (!canImport(Darwin) && compiler(>=5.9)) || (canImport(Darwin) && compiler(>=5.10))
import NIOCore
import NIOPosix
import NIOHTTP1
import NIOPosix
import NIOWebSocket

@available(macOS 14, iOS 17, tvOS 17, watchOS 10, *)
Expand Down Expand Up @@ -139,12 +138,3 @@ struct Client {
}
}
}

#else
@main
struct Server {
static func main() {
fatalError("Requires at least Swift 5.9")
}
}
#endif
12 changes: 1 addition & 11 deletions Sources/NIOWebSocketServer/Server.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
//
//===----------------------------------------------------------------------===//

#if (!canImport(Darwin) && compiler(>=5.9)) || (canImport(Darwin) && compiler(>=5.10))
import NIOCore
import NIOPosix
import NIOHTTP1
import NIOPosix
import NIOWebSocket

let websocketResponse = """
Expand Down Expand Up @@ -288,12 +287,3 @@ final class HTTPByteBufferResponsePartHandler: ChannelOutboundHandler {
}
}
}

#else
@main
struct Server {
static func main() {
fatalError("Requires at least Swift 5.9")
}
}
#endif
12 changes: 0 additions & 12 deletions Tests/NIOConcurrencyHelpersTests/NIOConcurrencyHelpersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,7 @@ class NIOConcurrencyHelpersTests: XCTestCase {
func testLockMutualExclusion() {
let l = NIOLock()

#if compiler(>=5.10)
nonisolated(unsafe) var x = 1
#else
var x = 1
#endif
let q = DispatchQueue(label: "q")
let g = DispatchGroup()
let sem1 = DispatchSemaphore(value: 0)
Expand Down Expand Up @@ -517,11 +513,7 @@ class NIOConcurrencyHelpersTests: XCTestCase {
func testWithLockMutualExclusion() {
let l = NIOLock()

#if compiler(>=5.10)
nonisolated(unsafe) var x = 1
#else
var x = 1
#endif
let q = DispatchQueue(label: "q")
let g = DispatchGroup()
let sem1 = DispatchSemaphore(value: 0)
Expand Down Expand Up @@ -553,11 +545,7 @@ class NIOConcurrencyHelpersTests: XCTestCase {
func testConditionLockMutualExclusion() {
let l = ConditionLock(value: 0)

#if compiler(>=5.10)
nonisolated(unsafe) var x = 1
#else
var x = 1
#endif
let q = DispatchQueue(label: "q")
let g = DispatchGroup()
let sem1 = DispatchSemaphore(value: 0)
Expand Down
12 changes: 0 additions & 12 deletions Tests/NIOCoreTests/AsyncSequences/NIOAsyncWriterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -708,15 +708,3 @@ final class NIOAsyncWriterTests: XCTestCase {
self.assert(suspendCallCount: 0, yieldCallCount: 0, terminateCallCount: 1)
}
}

#if !canImport(Darwin) && swift(<5.9.2)
extension XCTestCase {
func fulfillment(
of expectations: [XCTestExpectation],
timeout seconds: TimeInterval,
enforceOrder enforceOrderOfFulfillment: Bool = false
) async {
wait(for: expectations, timeout: seconds)
}
}
#endif
12 changes: 0 additions & 12 deletions Tests/NIOFileSystemIntegrationTests/FileSystemTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1885,15 +1885,3 @@ extension FileSystemTests {
XCTAssertEqual(contents, [0, 1, 2])
}
}

#if !canImport(Darwin) && swift(<5.9.2)
extension XCTestCase {
func fulfillment(
of expectations: [XCTestExpectation],
timeout seconds: TimeInterval,
enforceOrder enforceOrderOfFulfillment: Bool = false
) async {
wait(for: expectations, timeout: seconds)
}
}
#endif
Loading
Loading