Skip to content

Commit 8c872a5

Browse files
authored
Swift 5.8 (#135)
* Update devcontainer * Update workflows * Remove 5.4/5.5 Package.swift * Replace _MQTTSendable with Sendable
1 parent 65324e1 commit 8c872a5

17 files changed

+45
-116
lines changed

.devcontainer/devcontainer.json

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,29 @@
33
"dockerComposeFile": "docker-compose.yml",
44
"service": "app",
55
"workspaceFolder": "/workspace",
6-
"extensions": [
7-
"sswg.swift-lang"
8-
],
9-
"settings": {
10-
"lldb.library": "/usr/lib/liblldb.so"
6+
"features": {
7+
"ghcr.io/devcontainers/features/common-utils:2": {
8+
"installZsh": "false",
9+
"username": "vscode",
10+
"userUid": "1000",
11+
"userGid": "1000",
12+
"upgradePackages": "false"
13+
},
14+
"ghcr.io/devcontainers/features/git:1": {
15+
"version": "os-provided",
16+
"ppa": "false"
17+
}
18+
},
19+
// Configure tool-specific properties.
20+
"customizations": {
21+
// Configure properties specific to VS Code.
22+
"vscode": {
23+
"extensions": [
24+
"sswg.swift-lang"
25+
],
26+
"settings": {
27+
"lldb.library": "/usr/lib/liblldb.so"
28+
}
29+
}
1130
}
1231
}

.devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: "3.3"
33

44
services:
55
app:
6-
image: swift:5.6-focal
6+
image: swift:5.8
77
volumes:
88
- ..:/workspace
99
depends_on:

.github/workflows/api-breakage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
linux:
88
runs-on: ubuntu-latest
99
container:
10-
image: swift:5.7
10+
image: swift:5.8
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v3

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@ jobs:
4848
strategy:
4949
matrix:
5050
tag:
51-
- swift:5.4
52-
- swift:5.5
5351
- swift:5.6
5452
- swift:5.7
53+
- swift:5.8
5554
container:
5655
image: ${{ matrix.tag }}
5756
services:

[email protected]

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

[email protected]

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

Sources/MQTTNIO/AsyncAwaitSupport/MQTTClient+async.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
//
1212
//===----------------------------------------------------------------------===//
1313

14-
#if compiler(>=5.5) && canImport(_Concurrency)
15-
1614
import Foundation
1715
import NIOCore
1816

@@ -161,5 +159,3 @@ public class MQTTPublishListener: AsyncSequence {
161159
return self.stream.makeAsyncIterator()
162160
}
163161
}
164-
165-
#endif // compiler(>=5.5)

Sources/MQTTNIO/AsyncAwaitSupport/MQTTClientV5+async.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
//
1212
//===----------------------------------------------------------------------===//
1313

14-
#if compiler(>=5.5) && canImport(_Concurrency)
15-
1614
import Foundation
1715
import NIOCore
1816

@@ -147,5 +145,3 @@ public class MQTTPublishIdListener: AsyncSequence {
147145
return self.stream.makeAsyncIterator()
148146
}
149147
}
150-
151-
#endif // compiler(>=5.5)

Sources/MQTTNIO/AsyncAwaitSupport/Sendable.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,5 @@
1111
//
1212
//===----------------------------------------------------------------------===//
1313

14-
#if compiler(>=5.6)
14+
@available(*, deprecated, renamed: "Sendable")
1515
public typealias _MQTTSendable = Sendable
16-
#else
17-
public typealias _MQTTSendable = Any
18-
#endif

Sources/MQTTNIO/MQTTClient.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,6 @@ extension Logger {
759759
}
760760
}
761761

762-
#if compiler(>=5.6)
763762
// All public members of the class are immutable and the class manages access to the
764763
// internal mutable state via Locks
765764
extension MQTTClient: @unchecked Sendable {}
766-
#endif

0 commit comments

Comments
 (0)