Skip to content

Commit b0bbd59

Browse files
authored
Drop Swift 6.0 (#642)
1 parent f294b62 commit b0bbd59

4 files changed

Lines changed: 3 additions & 36 deletions

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
swift-image:
23-
- swift:6.0-jammy
24-
- swift:6.1-noble
23+
- swift:6.1-jammy
2524
- swift:6.2-noble
25+
- swift:6.3-noble
2626
- swiftlang/swift:nightly-main-noble
2727
container: ${{ matrix.swift-image }}
2828
runs-on: ubuntu-latest

Package.swift

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.1
22
import PackageDescription
33

4-
#if compiler(>=6.1)
54
let swiftSettings: [SwiftSetting] = [
65
.enableUpcomingFeature("ExistentialAny"),
76
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
87
]
9-
#else
10-
let swiftSettings: [SwiftSetting] = [
11-
.enableUpcomingFeature("ExistentialAny"),
12-
// Sadly the 6.0 compiler concurrency checker finds false positives.
13-
// To be able to compile, lets reduce the language version down to 5 for 6.0 only.
14-
.swiftLanguageMode(.v5),
15-
]
16-
#endif
178

189
let package = Package(
1910
name: "postgres-nio",

Tests/PostgresNIOTests/New/Data/UUID+PSQLCodableTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ import NIOCore
8181
}
8282
}
8383

84-
#if compiler(>=6.1)
8584
@Test func testDecodeFailureFromBytes() {
8685
let uuid = UUID()
8786
var buffer = ByteBuffer()
@@ -129,5 +128,4 @@ import NIOCore
129128
#expect(error == .typeMismatch)
130129
}
131130
}
132-
#endif
133131
}

Tests/PostgresNIOTests/New/PostgresCellTests.swift

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import NIOCore
4444
columnIndex: 1
4545
)
4646

47-
#if compiler(>=6.1)
4847
let error = #expect(throws: PostgresDecodingError.self) {
4948
try cell.decode(Int?.self, context: .default)
5049
}
@@ -62,26 +61,5 @@ import NIOCore
6261
#expect(correctType)
6362
#expect(error.postgresType == .text)
6463
#expect(error.postgresFormat == .binary)
65-
#else
66-
do {
67-
_ = try cell.decode(Int?.self, context: .default)
68-
Issue.record("Expected to throw")
69-
} catch {
70-
guard let error = error as? PostgresDecodingError else {
71-
Issue.record("Expected error at this point")
72-
return
73-
}
74-
75-
#expect(error.file == #fileID)
76-
#expect(error.line == #line - 9)
77-
#expect(error.code == .typeMismatch)
78-
#expect(error.columnName == "hello")
79-
#expect(error.columnIndex == 1)
80-
let correctType = error.targetType == Int?.self
81-
#expect(correctType)
82-
#expect(error.postgresType == .text)
83-
#expect(error.postgresFormat == .binary)
84-
}
85-
#endif
8664
}
8765
}

0 commit comments

Comments
 (0)