@@ -23,11 +23,16 @@ public enum XCBuildMessage {
23
23
case ok
24
24
case failed
25
25
case cancelled
26
+ case aborted
26
27
}
27
28
28
29
public let result : Result
29
30
}
30
31
32
+ public struct BuildOutputInfo {
33
+ let data : String
34
+ }
35
+
31
36
public struct DidUpdateProgressInfo {
32
37
public let message : String
33
38
public let percentComplete : Double
@@ -101,6 +106,7 @@ public enum XCBuildMessage {
101
106
case buildStarted
102
107
case buildDiagnostic( BuildDiagnosticInfo )
103
108
case buildCompleted( BuildCompletedInfo )
109
+ case buildOutput( BuildOutputInfo )
104
110
case preparationComplete
105
111
case didUpdateProgress( DidUpdateProgressInfo )
106
112
case targetUpToDate( TargetUpToDateInfo )
@@ -187,6 +193,7 @@ extension XCBuildOutputParser: JSONMessageStreamingParserDelegate {
187
193
extension XCBuildMessage . BuildDiagnosticInfo : Decodable , Equatable { }
188
194
extension XCBuildMessage . BuildCompletedInfo . Result : Decodable , Equatable { }
189
195
extension XCBuildMessage . BuildCompletedInfo : Decodable , Equatable { }
196
+ extension XCBuildMessage . BuildOutputInfo : Decodable , Equatable { }
190
197
extension XCBuildMessage . TargetUpToDateInfo : Decodable , Equatable { }
191
198
extension XCBuildMessage . TaskDiagnosticInfo : Decodable , Equatable { }
192
199
extension XCBuildMessage . TargetDiagnosticInfo : Decodable , Equatable { }
@@ -322,6 +329,8 @@ extension XCBuildMessage: Decodable, Equatable {
322
329
self = try . buildDiagnostic( BuildDiagnosticInfo ( from: decoder) )
323
330
case " buildCompleted " :
324
331
self = try . buildCompleted( BuildCompletedInfo ( from: decoder) )
332
+ case " buildOutput " :
333
+ self = try . buildOutput( BuildOutputInfo ( from: decoder) )
325
334
case " preparationComplete " :
326
335
self = . preparationComplete
327
336
case " didUpdateProgress " :
@@ -345,7 +354,7 @@ extension XCBuildMessage: Decodable, Equatable {
345
354
case " targetDiagnostic " :
346
355
self = try . targetDiagnostic( TargetDiagnosticInfo ( from: decoder) )
347
356
default :
348
- throw DecodingError . dataCorruptedError ( forKey: . kind, in: container, debugDescription: " invalid kind " )
357
+ throw DecodingError . dataCorruptedError ( forKey: . kind, in: container, debugDescription: " invalid kind \( kind ) " )
349
358
}
350
359
}
351
360
}
0 commit comments