This fixes all concurrency-related issues and makes the library compile under the Swift 6 language mode. Additionally:
The dependencies are bumped (since some of them include Swift 6-relevant fixes)
The minimum version of Swift is bumped to 5.10 (since this is the oldest source-compatible version that supports nonisolated(unsafe))
To fully enable it, we'll have to enable the language mode too, though, which also bumps the required Swift version to 6.0:
diff --git a/Package.swift b/Package.swift
index e8db2a8..cb0139a 100644
--- a/Package.swift
+++ b/Package.swift
@@ -1,4 +1,4 @@
-// swift-tools-version:5.7
+// swift-tools-version:6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
@@ -29,6 +29,9 @@
.product(name: "Logging", package: "swift-log"),
.product(name: "SwiftSoup", package: "SwiftSoup"),
.product(name: "XMLCoder", package: "XMLCoder"),
+ ],
+ swiftSettings: [
+ .swiftLanguageMode(.v6)
]
),
.testTarget(
Hence why we defer this to a future PR[^1].
[^1]: Side note: Unfortunately building with swift build -Xswiftc -swift-version -Xswiftc 6 as suggested in the migration guide is not sufficient as this will also try building dependencies like swift-log in Swift 6 language mode.
This fixes all concurrency-related issues and makes the library compile under the Swift 6 language mode. Additionally:
nonisolated(unsafe)
)To fully enable it, we'll have to enable the language mode too, though, which also bumps the required Swift version to 6.0:
Hence why we defer this to a future PR[^1].
[^1]: Side note: Unfortunately building with
swift build -Xswiftc -swift-version -Xswiftc 6
as suggested in the migration guide is not sufficient as this will also try building dependencies likeswift-log
in Swift 6 language mode.