12
12
13
13
import Dispatch
14
14
import Foundation
15
- import TSCBasic
16
15
16
+ import class TSCBasic. UnknownLocation
17
17
import enum TSCUtility. Diagnostics
18
+ import protocol TSCBasic. DiagnosticData
19
+ import protocol TSCBasic. DiagnosticLocation
18
20
import protocol TSCUtility. DiagnosticDataConvertible
21
+ import struct TSCBasic. Diagnostic
19
22
20
23
// this could become a struct when we remove the "errorsReported" pattern
21
24
@@ -527,14 +530,13 @@ extension ObservabilityMetadata {
527
530
528
531
// MARK: - Compatibility with TSC Diagnostics APIs
529
532
530
- @available ( * , deprecated, message: " temporary for transition DiagnosticsEngine -> DiagnosticsEmitter " )
531
533
extension ObservabilityScope {
532
- public func makeDiagnosticsEngine ( ) -> DiagnosticsEngine {
533
- return . init ( handlers : [ { Diagnostic ( $0) . map { self . diagnosticsHandler. handleDiagnostic ( scope: self , diagnostic: $0) } } ] )
534
+ public func makeDiagnosticsHandler ( ) -> ( TSCBasic . Diagnostic ) -> Void {
535
+ { Diagnostic ( $0) . map { self . diagnosticsHandler. handleDiagnostic ( scope: self , diagnostic: $0) } }
534
536
}
535
537
}
536
538
537
- @available ( * , deprecated, message: " temporary for transition DiagnosticsEngine -> DiagnosticsEmitter " )
539
+ @available ( * , deprecated, message: " temporary for transition TSCBasic.Diagnostic -> SwiftDriver.Diagnostic " )
538
540
extension Diagnostic {
539
541
init ? ( _ diagnostic: TSCBasic . Diagnostic ) {
540
542
var metadata = ObservabilityMetadata ( )
@@ -558,7 +560,7 @@ extension Diagnostic {
558
560
}
559
561
}
560
562
561
- @available ( * , deprecated, message: " temporary for transition DiagnosticsEngine -> DiagnosticsEmitter " )
563
+ @available ( * , deprecated, message: " temporary for transition TSCBasic.Diagnostic -> SwiftDriver.Diagnostic " )
562
564
extension ObservabilityMetadata {
563
565
public var legacyDiagnosticLocation : DiagnosticLocationWrapper ? {
564
566
get {
@@ -586,7 +588,7 @@ extension ObservabilityMetadata {
586
588
}
587
589
}
588
590
589
- @available ( * , deprecated, message: " temporary for transition DiagnosticsEngine -> DiagnosticsEmitter " )
591
+ @available ( * , deprecated, message: " temporary for transition TSCBasic.Diagnostic -> SwiftDriver.Diagnostic " )
590
592
extension ObservabilityMetadata {
591
593
var legacyDiagnosticData : DiagnosticDataWrapper ? {
592
594
get {
0 commit comments