From 67cf1e7b6327e4c1245e681282399690750f035a Mon Sep 17 00:00:00 2001 From: treastrain / Tanaka Ryoga Date: Sun, 28 Jan 2024 17:31:16 +0900 Subject: [PATCH] Update to Swift 5.9 and visionOS --- Package.swift | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index fd104fe1..0d4fc601 100644 --- a/Package.swift +++ b/Package.swift @@ -1,13 +1,27 @@ -// swift-tools-version: 5.8 +// swift-tools-version: 5.9 import PackageDescription let packageName = "TRETNFCKit" +extension SwiftSetting { + static let forwardTrailingClosures: Self = .enableUpcomingFeature("ForwardTrailingClosures") + static let strictConcurrency: Self = .enableUpcomingFeature("StrictConcurrency") + static let existentialAny: Self = .enableUpcomingFeature("ExistentialAny") + static let bareSlashRegexLiterals: Self = .enableUpcomingFeature("BareSlashRegexLiterals") + static let conciseMagicFile: Self = .enableUpcomingFeature("ConciseMagicFile") + static let importObjcForwardDeclarations: Self = .enableUpcomingFeature("ImportObjcForwardDeclarations") + static let disableOutwardActorInference: Self = .enableUpcomingFeature("DisableOutwardActorInference") +} + let swiftSettings: [SwiftSetting] = [ - .enableUpcomingFeature("ExistentialAny"), - .enableUpcomingFeature("StrictConcurrency"), - .unsafeFlags(["-enable-actor-data-race-checks"], .when(configuration: .debug)), + .forwardTrailingClosures, + .strictConcurrency, + .existentialAny, + .bareSlashRegexLiterals, + .conciseMagicFile, + .importObjcForwardDeclarations, + .disableOutwardActorInference, ] var products: [Product] = [] @@ -58,7 +72,7 @@ targets.append( let package = Package( name: packageName, defaultLocalization: "en", - platforms: [.iOS(.v13), .macOS(.v10_15), .macCatalyst(.v13), .tvOS(.v13), .watchOS(.v6)], + platforms: [.iOS(.v13), .macOS(.v10_15), .macCatalyst(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)], products: products, targets: targets )