Modern Apps git

← xtool.git

Support building with Swift 6.2 (#114)

Commit
d691e614b408c2afaf8d1484586c0c0d4a0fa0f7
Author
Kabir Oberai <[email protected]>
When
2025-07-12 20:28 UTC (1 year ago)
Parents
74d6a91

Diff

Package.resolved
diff --git a/Package.resolved b/Package.resolvedindex dbef737..d945df0 100644--- a/Package.resolved+++ b/Package.resolved@@ -1,5 +1,5 @@ {-  "originHash" : "d08ba8535e09303ac5be5621b8aea1a2409ebcb2ab566d661a63ec8ab5825189",+  "originHash" : "30ba8b3b894def5b779d979643d77deb698479066658be3b18dad2fb6a193579",   "pins" : [     {       "identity" : "aexml",@@ -339,8 +339,8 @@       "kind" : "remoteSourceControl",       "location" : "https://github.com/xtool-org/SwiftyMobileDevice",       "state" : {-        "revision" : "5ee5f680d065519dd6ac56c96435a7db0d599ade",-        "version" : "1.4.0"+        "revision" : "280d0dc8153469944491aee2f19af29e9c7a77f0",+        "version" : "1.5.0"       }     },     {@@ -348,8 +348,8 @@       "kind" : "remoteSourceControl",       "location" : "https://github.com/saagarjha/unxip",       "state" : {-        "revision" : "d6f0009109f7502f8f5b3f23dcd5b43cf5b29b32",-        "version" : "3.1.0"+        "revision" : "03c32d6b4e7d8a9fb58747e5f8b83397da8bf5ba",+        "version" : "3.2.0"       }     },     {@@ -402,8 +402,8 @@       "kind" : "remoteSourceControl",       "location" : "https://github.com/xtool-org/xtool-core",       "state" : {-        "revision" : "63c644eef014f7faff53daaebe8bad37c31fbbe5",-        "version" : "1.3.0"+        "revision" : "d412ac768d1e73d16ad7ccc6805f12fc701709f6",+        "version" : "1.4.0"       }     },     {@@ -420,8 +420,8 @@       "kind" : "remoteSourceControl",       "location" : "https://github.com/xtool-org/zsign",       "state" : {-        "revision" : "7c669ed2423c53076d511b875a914f01ba7de062",-        "version" : "1.5.2"+        "revision" : "fb10d47dd24bb84886532497bac149232e67f07a",+        "version" : "1.6.0"       }     }   ],
Package.swift
diff --git a/Package.swift b/Package.swiftindex b7a293e..4a702ee 100644--- a/Package.swift+++ b/Package.swift@@ -40,9 +40,9 @@ let package = Package(         ),     ],     dependencies: [-        .package(url: "https://github.com/xtool-org/xtool-core", .upToNextMinor(from: "1.3.0")),-        .package(url: "https://github.com/xtool-org/SwiftyMobileDevice", .upToNextMinor(from: "1.4.0")),-        .package(url: "https://github.com/xtool-org/zsign", .upToNextMinor(from: "1.5.2")),+        .package(url: "https://github.com/xtool-org/xtool-core", .upToNextMinor(from: "1.4.0")),+        .package(url: "https://github.com/xtool-org/SwiftyMobileDevice", .upToNextMinor(from: "1.5.0")),+        .package(url: "https://github.com/xtool-org/zsign", .upToNextMinor(from: "1.6.0")),          .package(url: "https://github.com/apple/swift-system", from: "1.4.0"),         .package(url: "https://github.com/apple/swift-http-types", from: "1.3.1"),@@ -65,7 +65,7 @@ let package = Package(         .package(url: "https://github.com/attaswift/BigInt", from: "5.5.0"),         .package(url: "https://github.com/mxcl/Version", from: "2.1.0"),         .package(url: "https://github.com/jpsim/Yams", from: "5.1.3"),-        .package(url: "https://github.com/saagarjha/unxip", from: "3.1.0"),+        .package(url: "https://github.com/saagarjha/unxip", from: "3.2.0"),          // TODO: just depend on tuist/XcodeProj instead         .package(url: "https://github.com/yonaskolb/XcodeGen", from: "2.43.0"),
Sources/XKit/Installation/Connection.swift
diff --git a/Sources/XKit/Installation/Connection.swift b/Sources/XKit/Installation/Connection.swiftindex 74c8544..494b80a 100644--- a/Sources/XKit/Installation/Connection.swift+++ b/Sources/XKit/Installation/Connection.swift@@ -139,7 +139,11 @@ public actor Connection {  } -private actor WeakPool<Key: Hashable, Value: AnyObject & Sendable, Failure: Error> {+#if compiler(<6.2)+private typealias SendableMetatype = Any+#endif++private actor WeakPool<Key: Hashable & SendableMetatype, Value: AnyObject & Sendable, Failure: Error> {     init() {}      private var pendingValues: [Key: Task<Result<Value, Failure>, Never>] = [:]
Sources/XToolSupport/XTool.swift
diff --git a/Sources/XToolSupport/XTool.swift b/Sources/XToolSupport/XTool.swiftindex cb05e6f..d4d0a41 100644--- a/Sources/XToolSupport/XTool.swift+++ b/Sources/XToolSupport/XTool.swift@@ -43,7 +43,11 @@ private struct XToolCommand: AsyncParsableCommand {     ) } -extension ParsableCommand {+#if compiler(<6.2)+private typealias SendableMetatype = Any+#endif++extension ParsableCommand where Self: SendableMetatype {     fileprivate static func cancellableMain(_ arguments: [String]? = nil) async {         let (canStart, cont) = AsyncStream.makeStream(of: Never.self)         let task = Task {