Skip to content

Commit 209192d

Browse files
committed
Require Swift 5.6 Compiler for Concurrency Support
1 parent 15c06e0 commit 209192d

17 files changed

+24
-24
lines changed

Documentation/Concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ try dbQueue.write { db in
137137
<details>
138138
<summary><b>Swift concurrency</b> (async/await)</summary>
139139

140-
[**:fire: EXPERIMENTAL**](../README.md#what-are-experimental-features) GRDB support for Swift concurrency requires Xcode 13.2+.
140+
[**:fire: EXPERIMENTAL**](../README.md#what-are-experimental-features) GRDB support for Swift concurrency requires Xcode 13.3.1+.
141141

142142
```swift
143143
let playerCount = try await dbQueue.read { db in

GRDB/Core/DatabasePool.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public final class DatabasePool: DatabaseWriter {
160160
}
161161
}
162162

163-
#if swift(>=5.5) && canImport(_Concurrency)
163+
#if swift(>=5.6) && canImport(_Concurrency)
164164
// @unchecked because of databaseSnapshotCount and readerPool
165165
extension DatabasePool: @unchecked Sendable { }
166166
#endif

GRDB/Core/DatabaseReader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ extension DatabaseReader {
371371
}
372372
}
373373

374-
#if compiler(>=5.5.2) && canImport(_Concurrency)
374+
#if compiler(>=5.6) && canImport(_Concurrency)
375375
extension DatabaseReader {
376376
// MARK: - Asynchronous Database Access
377377

GRDB/Core/DatabaseValue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ extension DatabaseValue: StatementBinding {
159159

160160
extension DatabaseValue: GRDBSendable { }
161161

162-
#if swift(>=5.5) && canImport(_Concurrency)
162+
#if swift(>=5.6) && canImport(_Concurrency)
163163
// @unchecked due to Foundation.Data not conforming to Sendable
164164
// TODO: Remove @unchecked when Foundation has been upgraded
165165
extension DatabaseValue.Storage: @unchecked Sendable { }

GRDB/Core/DatabaseWriter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ extension DatabaseWriter {
380380
}
381381
}
382382

383-
#if compiler(>=5.5.2) && canImport(_Concurrency)
383+
#if compiler(>=5.6) && canImport(_Concurrency)
384384
extension DatabaseWriter {
385385
// MARK: - Asynchronous Database Access
386386

GRDB/Core/Row.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2182,7 +2182,7 @@ struct ArrayRowImpl: RowImpl {
21822182
}
21832183
}
21842184

2185-
#if swift(>=5.5) && canImport(_Concurrency)
2185+
#if swift(>=5.6) && canImport(_Concurrency)
21862186
// @unchecked because columns property is not inferred as Sendable
21872187
// TODO: remove this @unchecked when compiler can handle tuples.
21882188
extension ArrayRowImpl: @unchecked Sendable { }

GRDB/Core/SerializedDatabase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ final class SerializedDatabase {
249249
}
250250
}
251251

252-
#if swift(>=5.5) && canImport(_Concurrency)
252+
#if swift(>=5.6) && canImport(_Concurrency)
253253
// @unchecked because the wrapped `Database` itself is not Sendable.
254254
// It happens the job of SerializedDatabase is precisely to provide thread-safe
255255
// access to `Database`.

GRDB/Utils/Utils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public protocol _OptionalProtocol {
3232
/// :nodoc:
3333
extension Optional: _OptionalProtocol { }
3434

35-
#if swift(>=5.5) && canImport(_Concurrency)
35+
#if swift(>=5.6) && canImport(_Concurrency)
3636
public typealias GRDBSendable = Swift.Sendable
3737
#else
3838
public typealias GRDBSendable = Any

GRDB/ValueObservation/SharedValueObservation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public final class SharedValueObservation<Element> {
299299
}
300300
}
301301

302-
#if compiler(>=5.5.2) && canImport(_Concurrency)
302+
#if compiler(>=5.6) && canImport(_Concurrency)
303303
extension SharedValueObservation {
304304
// MARK: - Asynchronous Observation
305305
/// The database observation, as an asynchronous sequence of

GRDB/ValueObservation/ValueObservation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ extension ValueObservation: Refinable {
252252
}
253253
}
254254

255-
#if compiler(>=5.5.2) && canImport(_Concurrency)
255+
#if compiler(>=5.6) && canImport(_Concurrency)
256256
extension ValueObservation {
257257
// MARK: - Asynchronous Observation
258258
/// The database observation, as an asynchronous sequence of

0 commit comments

Comments
 (0)