Skip to content

Commit 4b38f35

Browse files
authored
Drop Swift 5.9 (#536)
Motivation: Swift 5.9 is no longer supported, we should bump the tools version and remove it from our CI. Modifications: * Bump the Swift tools version to Swift 5.10 * Remove Swift 5.9 jobs where appropriate in main.yml, pull_request.yml Result: Code reflects our support window.
1 parent 8061e1e commit 4b38f35

File tree

12 files changed

+3
-36
lines changed

12 files changed

+3
-36
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
name: Unit tests
1212
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
1313
with:
14-
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
1514
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
1615
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
1716
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"

.github/workflows/pull_request.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
name: Unit tests
1515
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
1616
with:
17-
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
1817
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
1918
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
2019
linux_6_1_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"

Benchmarks/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.9
1+
// swift-tools-version:5.10
22

33
import PackageDescription
44

Benchmarks/Thresholds/5.9/NIOSSHBenchmarks.ManyWrites.p90.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

Benchmarks/Thresholds/5.9/NIOSSHBenchmarks.SimpleHandshake.p90.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.9
1+
// swift-tools-version:5.10
22
//===----------------------------------------------------------------------===//
33
//
44
// This source file is part of the SwiftNIO open source project

Sources/NIOSSL/ByteBufferBIO.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,8 @@ final class ByteBufferBIO {
175175
/// using a ByteBufferBIO. There will only ever be one value of this in a NIO program,
176176
/// and it will always be non-NULL. Failure to initialize this structure is fatal to
177177
/// the program.
178-
#if compiler(>=5.10)
179178
nonisolated(unsafe) private static let boringSSLBIOMethod: UnsafeMutablePointer<BIO_METHOD> =
180179
buildBoringSSLBIOMethod()
181-
#else
182-
private static let boringSSLBIOMethod: UnsafeMutablePointer<BIO_METHOD> = buildBoringSSLBIOMethod()
183-
#endif
184180

185181
private static func buildBoringSSLBIOMethod() -> UnsafeMutablePointer<BIO_METHOD> {
186182
guard boringSSLIsInitialized else {

Sources/NIOSSL/CustomPrivateKey.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,8 @@ extension SSLConnection {
222222

223223
// We heap-allocate the SSL_PRIVATE_KEY_METHOD we need because we can't define a static stored property with fixed address
224224
// in Swift.
225-
#if compiler(>=5.10)
226225
nonisolated(unsafe) internal let customPrivateKeyMethod: UnsafePointer<SSL_PRIVATE_KEY_METHOD> =
227226
buildCustomPrivateKeyMethod()
228-
#else
229-
internal let customPrivateKeyMethod: UnsafePointer<SSL_PRIVATE_KEY_METHOD> = buildCustomPrivateKeyMethod()
230-
#endif
231227

232228
private func buildCustomPrivateKeyMethod() -> UnsafePointer<SSL_PRIVATE_KEY_METHOD> {
233229
let pointer = UnsafeMutablePointer<SSL_PRIVATE_KEY_METHOD>.allocate(capacity: 1)

Sources/NIOSSLPerformanceTester/main.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ import Foundation
1717

1818
// MARK: Test Harness
1919

20-
#if compiler(>=5.10)
2120
nonisolated(unsafe) var warning: String = ""
22-
#else
23-
var warning: String = ""
24-
#endif
2521

2622
assert(
2723
{

Tests/NIOSSLTests/CustomPrivateKeyTests.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@ import XCTest
1919

2020
@testable import NIOSSL
2121

22-
#if compiler(>=5.1)
2322
#if compiler(>=6.1)
2423
internal import CNIOBoringSSL
2524
#else
2625
@_implementationOnly import CNIOBoringSSL
2726
#endif
28-
#else
29-
import CNIOBoringSSL
30-
#endif
3127

3228
// This is a helper that lets us work with an EVP_PKEY.
3329
//

0 commit comments

Comments
 (0)