Skip to content

Commit 8a39dc0

Browse files
authored
Make a few diagnostics-related types Sendable (#389)
This makes it easier to migrate more SwiftPM's types to Swift Concurrency.
1 parent 7bc4ec9 commit 8a39dc0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/TSCBasic/DiagnosticsEngine.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
import Dispatch
1212

1313
/// The payload of a diagnostic.
14-
public protocol DiagnosticData: CustomStringConvertible {
14+
public protocol DiagnosticData: Sendable, CustomStringConvertible {
1515
}
1616

1717
extension DiagnosticData {
1818
public var localizedDescription: String { self.description }
1919
}
2020

21-
public protocol DiagnosticLocation: CustomStringConvertible {
21+
public protocol DiagnosticLocation: Sendable, CustomStringConvertible {
2222
}
2323

2424
public struct Diagnostic: CustomStringConvertible {

Sources/TSCUtility/SerializedDiagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ extension SerializedDiagnostics {
149149
}
150150
}
151151

152-
public struct SourceLocation: Equatable {
152+
public struct SourceLocation: Equatable, Sendable {
153153
/// The filename associated with the diagnostic.
154154
public var filename: String
155155
public var line: UInt64

0 commit comments

Comments
 (0)