Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sendable warnings. #117

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions Package@swift-5.9.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// swift-tools-version:5.9

import PackageDescription

let package = Package(
name: "swift-custom-dump",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6),
],
products: [
.library(
name: "CustomDump",
targets: ["CustomDump"]
)
],
dependencies: [
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.0.0")
],
targets: [
.target(
name: "CustomDump",
dependencies: [
.product(name: "XCTestDynamicOverlay", package: "xctest-dynamic-overlay")
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]
Comment on lines +28 to +30
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is a safe thing to include in SPM now (as opposed to the unsafe flags), but it does require Swift 5.9 so I had to dupe the Package.swift file.

),
.testTarget(
name: "CustomDumpTests",
dependencies: [
"CustomDump"
]
),
]
)
2 changes: 1 addition & 1 deletion Sources/CustomDump/Diff.swift
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ public func diff<T>(_ lhs: T, _ rhs: T, format: DiffFormat = .default) -> String
///
/// This type comes with two pre-configured formats that you will probably want to use for most
/// situations: ``DiffFormat/default`` and ``DiffFormat/proportional``.
public struct DiffFormat {
public struct DiffFormat: Sendable {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed because of the static lets down below.

/// A string prepended to lines that only appear in the string representation of the first value,
/// e.g. a "removal."
public var first: String
Expand Down
Loading