Skip to content

Commit d84ff12

Browse files
authored
Fix swift 6 concurrency issues (#107)
* fix: swift-tools-version declaration * feat: add Sendable comformance to Node and its dependant types * fix: Xcode 15 errors updated swift-snapshot-testing * refactor: fix snapshot-testing rename warnings * test with swift:6.0-focal
1 parent c00656e commit d84ff12

File tree

5 files changed

+27
-19
lines changed

5 files changed

+27
-19
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ test-linux:
33
--rm \
44
-v "$(PWD):$(PWD)" \
55
-w "$(PWD)" \
6-
swift:5.7-focal \
6+
swift:6.0-focal \
77
bash -c 'swift test'
88

99
test-macos: xcodeproj

Package.resolved

Lines changed: 21 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.5
1+
// swift-tools-version: 5.5
22
import PackageDescription
33

44
let package = Package(
@@ -17,7 +17,7 @@ let package = Package(
1717
targets: ["HtmlSnapshotTesting"]),
1818
],
1919
dependencies: [
20-
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.11.0")
20+
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.11.1")
2121
],
2222
targets: [
2323
.target(

Sources/HtmlSnapshotTesting/HtmlSnapshotTesting.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Html
2-
import SnapshotTesting
2+
@preconcurrency import SnapshotTesting
33

44
extension Snapshotting where Value == [Node], Format == String {
55
public static var html: Snapshotting {

Tests/HtmlSnapshotTestingTests/HtmlSnapshotTestingTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ final class SnapshotTestingTests: XCTestCase {
496496
)
497497
)
498498

499-
assertSnapshot(matching: doc, as: .html)
499+
assertSnapshot(of: doc, as: .html)
500500
}
501501

502502
func testSnapshots() {
@@ -642,6 +642,6 @@ final class SnapshotTestingTests: XCTestCase {
642642
.video(.track(src: "track1"), transparent: "Fallback"),
643643
]
644644

645-
assertSnapshot(matching: doc, as: .html)
645+
assertSnapshot(of: doc, as: .html)
646646
}
647647
}

0 commit comments

Comments
 (0)