Skip to content

Commit 769d31c

Browse files
committed
Update formatting and gate availability for older compilers
1 parent 3b914d5 commit 769d31c

File tree

5 files changed

+282
-248
lines changed

5 files changed

+282
-248
lines changed

Package.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@
33
import PackageDescription
44
import CompilerPluginSupport
55

6+
let AsyncAlgorithms_v1_0 = "AvailabilityMacro=AsyncAlgorithms 1.0:macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0"
7+
#if compiler(>=6.0)
8+
let AsyncAlgorithms_v1_1 =
9+
"AvailabilityMacro=AsyncAlgorithms 1.1:macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0"
10+
#else
11+
let AsyncAlgorithms_v1_1 = "AvailabilityMacro=AsyncAlgorithms 1.1:macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0"
12+
#endif
13+
614
let availabilityMacros: [SwiftSetting] = [
715
.enableExperimentalFeature(
8-
"AvailabilityMacro=AsyncAlgorithms 1.0:macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0"
16+
AsyncAlgorithms_v1_0
917
),
1018
.enableExperimentalFeature(
11-
"AvailabilityMacro=AsyncAlgorithms 1.1:macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0"
19+
AsyncAlgorithms_v1_1
1220
),
1321
]
1422

0 commit comments

Comments
 (0)