Require canImport(_Concurrency)

This fixes the build for macOS 11.5
This commit is contained in:
Gwendal Roué committed 2021-10-17 13:26:41 +02:00
1 parent 646782d499
commit 2ad6131d08
9 files changed
+19 -19

No files matched your search

+1 -1
View File
@@ -307,7 +307,7 @@ extension DatabaseReader {
}
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
extension DatabaseReader {
// MARK: - Asynchronous Database Access
+1 -1
View File
@@ -415,7 +415,7 @@ extension DatabaseWriter {
}
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
extension DatabaseWriter {
// MARK: - Asynchronous Database Access
+3 -3
View File
@@ -115,7 +115,7 @@ public struct DatabaseMigrator {
try migrate(writer, upTo: lastMigration.identifier)
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
/// Iterate migrations in the same order as they were registered. If a
/// migration has not yet been applied, its block is executed in
/// a transaction.
@@ -147,7 +147,7 @@ public struct DatabaseMigrator {
}
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
/// Iterate migrations in the same order as they were registered, up to the
/// provided target. If a migration has not yet been applied, its block is
/// executed in a transaction.
@@ -162,7 +162,7 @@ public struct DatabaseMigrator {
try migrate(db, upTo: targetIdentifier)
}
}
#endif
#endif
/// Iterate migrations in the same order as they were registered. If a
/// migration has not yet been applied, its block is executed in
+1 -1
View File
@@ -211,7 +211,7 @@ extension ValueObservation: Refinable {
}
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
extension ValueObservation {
// MARK: - Asynchronous Observation
+1 -1
View File
@@ -51,7 +51,7 @@ final class Test<Context> {
}
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
final class AsyncTest<Context> {
// Raise the repeatCount in order to help spotting flaky tests.
+2 -2
View File
@@ -98,7 +98,7 @@ class DatabaseMigratorTests : GRDBTestCase {
.runAtTemporaryDatabasePath { try DatabasePool(path: $0) }
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_NonEmptyMigratorSync() async throws {
func test(writer: DatabaseWriter) async throws {
@@ -423,7 +423,7 @@ class DatabaseMigratorTests : GRDBTestCase {
.runAtTemporaryDatabasePath { try DatabasePool(path: $0) }
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_MigrateUpTo() async throws {
func test(writer: DatabaseWriter) async throws {
+3 -3
View File
@@ -30,7 +30,7 @@ class DatabaseReaderTests : GRDBTestCase {
try test(setup(makeDatabasePool()).makeSnapshot())
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_ReadCanRead() async throws {
func setup<T: DatabaseWriter>(_ dbWriter: T) throws -> T {
@@ -68,7 +68,7 @@ class DatabaseReaderTests : GRDBTestCase {
try test(makeDatabasePool().makeSnapshot())
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_ReadPreventsDatabaseModification() async throws {
func test(_ dbReader: DatabaseReader) async throws {
@@ -107,7 +107,7 @@ class DatabaseReaderTests : GRDBTestCase {
try test(setup(makeDatabasePool()).makeSnapshot())
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_UnsafeReadCanRead() async throws {
func setup<T: DatabaseWriter>(_ dbWriter: T) throws -> T {
+6 -6
View File
@@ -266,7 +266,7 @@ class DatabaseWriterTests : GRDBTestCase {
try DatabaseQueue().backup(to: dbQueue)
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_write() async throws {
func setup<T: DatabaseWriter>(_ dbWriter: T) throws -> T {
@@ -288,7 +288,7 @@ class DatabaseWriterTests : GRDBTestCase {
}
#endif
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_writeWithoutTransaction() async throws {
func setup<T: DatabaseWriter>(_ dbWriter: T) throws -> T {
@@ -313,7 +313,7 @@ class DatabaseWriterTests : GRDBTestCase {
}
#endif
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_barrierWriteWithoutTransaction() async throws {
func setup<T: DatabaseWriter>(_ dbWriter: T) throws -> T {
@@ -338,7 +338,7 @@ class DatabaseWriterTests : GRDBTestCase {
}
#endif
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_erase() async throws {
func setup<T: DatabaseWriter>(_ dbWriter: T) throws -> T {
@@ -358,7 +358,7 @@ class DatabaseWriterTests : GRDBTestCase {
}
#endif
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_vacuum() async throws {
func setup<T: DatabaseWriter>(_ dbWriter: T) throws -> T {
@@ -376,7 +376,7 @@ class DatabaseWriterTests : GRDBTestCase {
}
#endif
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
func testAsyncAwait_vacuumInto() async throws {
func setup<T: DatabaseWriter>(_ dbWriter: T) throws -> T {
+1 -1
View File
@@ -519,7 +519,7 @@ class ValueObservationTests: GRDBTestCase {
try test(makeDatabasePool())
}
#if swift(>=5.5)
#if swift(>=5.5) && canImport(_Concurrency)
// MARK: - Async Await
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)