From 8ac581c2a9feea834a69f80d25581ca53fb76312 Mon Sep 17 00:00:00 2001 From: Paul Kraft Date: Fri, 3 May 2024 20:00:34 +0200 Subject: [PATCH] Enable Strict Concurrency Checking --- Package.swift | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 4dd409a3..5b63f45b 100644 --- a/Package.swift +++ b/Package.swift @@ -10,6 +10,15 @@ import PackageDescription +#if swift(<6) +let swiftSettings: [SwiftSetting] = [ + .enableExperimentalFeature("SwiftConcurrency") +] +#else +let swiftSettings: [SwiftSetting] = [ + .enableUpcomingFeature("SwiftConcurrency") +] +#endif let package = Package( name: "Spezi", @@ -35,13 +44,15 @@ let package = Package( dependencies: [ .product(name: "SpeziFoundation", package: "SpeziFoundation"), .product(name: "XCTRuntimeAssertions", package: "XCTRuntimeAssertions") - ] + ], + swiftSettings: swiftSettings ), .target( name: "XCTSpezi", dependencies: [ .target(name: "Spezi") - ] + ], + swiftSettings: swiftSettings ), .testTarget( name: "SpeziTests", @@ -49,7 +60,8 @@ let package = Package( .target(name: "Spezi"), .target(name: "XCTSpezi"), .product(name: "XCTRuntimeAssertions", package: "XCTRuntimeAssertions") - ] + ], + swiftSettings: swiftSettings ) ] )