Skip to content

Commit

Permalink
Fix swift 6 concurrency issues (#107)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
alephao authored Oct 21, 2024
1 parent c00656e commit d84ff12
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ test-linux:
--rm \
-v "$(PWD):$(PWD)" \
-w "$(PWD)" \
swift:5.7-focal \
swift:6.0-focal \
bash -c 'swift test'

test-macos: xcodeproj
Expand Down
34 changes: 21 additions & 13 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{
"object": {
"pins": [
{
"package": "swift-snapshot-testing",
"repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing.git",
"state": {
"branch": null,
"revision": "cef5b3f6f11781dd4591bdd1dd0a3d22bd609334",
"version": "1.11.0"
}
"originHash" : "c2217f3a9bfb04515bca941987fb8e52aa0d2033cd77f82c6ff0f91a868fe948",
"pins" : [
{
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing.git",
"state" : {
"revision" : "7b0bbbae90c41f848f90ac7b4df6c4f50068256d",
"version" : "1.17.5"
}
]
},
"version": 1
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftlang/swift-syntax",
"state" : {
"revision" : "0687f71944021d616d34d922343dcef086855920",
"version" : "600.0.1"
}
}
],
"version" : 3
}
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.5
// swift-tools-version: 5.5
import PackageDescription

let package = Package(
Expand All @@ -17,7 +17,7 @@ let package = Package(
targets: ["HtmlSnapshotTesting"]),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.11.0")
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.11.1")
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Sources/HtmlSnapshotTesting/HtmlSnapshotTesting.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Html
import SnapshotTesting
@preconcurrency import SnapshotTesting

extension Snapshotting where Value == [Node], Format == String {
public static var html: Snapshotting {
Expand Down
4 changes: 2 additions & 2 deletions Tests/HtmlSnapshotTestingTests/HtmlSnapshotTestingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ final class SnapshotTestingTests: XCTestCase {
)
)

assertSnapshot(matching: doc, as: .html)
assertSnapshot(of: doc, as: .html)
}

func testSnapshots() {
Expand Down Expand Up @@ -642,6 +642,6 @@ final class SnapshotTestingTests: XCTestCase {
.video(.track(src: "track1"), transparent: "Fallback"),
]

assertSnapshot(matching: doc, as: .html)
assertSnapshot(of: doc, as: .html)
}
}

0 comments on commit d84ff12

Please sign in to comment.