@@ -30,7 +30,7 @@ public enum XCBuildMessage {
30
30
}
31
31
32
32
public struct BuildOutputInfo {
33
- let data : String
33
+ public let data : String
34
34
}
35
35
36
36
public struct DidUpdateProgressInfo {
@@ -62,31 +62,31 @@ public enum XCBuildMessage {
62
62
}
63
63
64
64
public struct TaskUpToDateInfo {
65
- let targetID : Int ?
66
- let taskSignature : String
67
- let parentTaskID : Int ?
65
+ public let targetID : Int ?
66
+ public let taskSignature : String
67
+ public let parentTaskID : Int ?
68
68
}
69
69
70
70
public struct TaskStartedInfo {
71
- let taskID : Int
72
- let targetID : Int ?
73
- let taskSignature : String
74
- let parentTaskID : Int ?
75
- let ruleInfo : String
76
- let interestingPath : AbsolutePath ?
77
- let commandLineDisplayString : String ?
78
- let executionDescription : String
71
+ public let taskID : Int
72
+ public let targetID : Int ?
73
+ public let taskSignature : String
74
+ public let parentTaskID : Int ?
75
+ public let ruleInfo : String
76
+ public let interestingPath : AbsolutePath ?
77
+ public let commandLineDisplayString : String ?
78
+ public let executionDescription : String
79
79
}
80
80
81
81
public struct TaskDiagnosticInfo {
82
- let taskID : Int
83
- let targetID : Int ?
84
- let message : String
82
+ public let taskID : Int
83
+ public let targetID : Int ?
84
+ public let message : String
85
85
}
86
86
87
87
public struct TaskOutputInfo {
88
- let taskID : Int
89
- let data : String
88
+ public let taskID : Int
89
+ public let data : String
90
90
}
91
91
92
92
public struct TaskCompleteInfo {
@@ -96,14 +96,14 @@ public enum XCBuildMessage {
96
96
case cancelled
97
97
}
98
98
99
- let taskID : Int
100
- let result : Result
101
- let signalled : Bool
99
+ public let taskID : Int
100
+ public let result : Result
101
+ public let signalled : Bool
102
102
}
103
103
104
104
public struct TargetDiagnosticInfo {
105
- let targetID : Int
106
- let message : String
105
+ public let targetID : Int
106
+ public let message : String
107
107
}
108
108
109
109
case buildStarted
@@ -123,15 +123,15 @@ public enum XCBuildMessage {
123
123
case targetDiagnostic( TargetDiagnosticInfo )
124
124
}
125
125
126
- extension XCBuildMessage . BuildDiagnosticInfo : Decodable , Equatable { }
127
- extension XCBuildMessage . BuildCompletedInfo . Result : Decodable , Equatable { }
128
- extension XCBuildMessage . BuildCompletedInfo : Decodable , Equatable { }
129
- extension XCBuildMessage . BuildOutputInfo : Decodable , Equatable { }
130
- extension XCBuildMessage . TargetUpToDateInfo : Decodable , Equatable { }
131
- extension XCBuildMessage . TaskDiagnosticInfo : Decodable , Equatable { }
132
- extension XCBuildMessage . TargetDiagnosticInfo : Decodable , Equatable { }
126
+ extension XCBuildMessage . BuildDiagnosticInfo : Codable , Equatable { }
127
+ extension XCBuildMessage . BuildCompletedInfo . Result : Codable , Equatable { }
128
+ extension XCBuildMessage . BuildCompletedInfo : Codable , Equatable { }
129
+ extension XCBuildMessage . BuildOutputInfo : Codable , Equatable { }
130
+ extension XCBuildMessage . TargetUpToDateInfo : Codable , Equatable { }
131
+ extension XCBuildMessage . TaskDiagnosticInfo : Codable , Equatable { }
132
+ extension XCBuildMessage . TargetDiagnosticInfo : Codable , Equatable { }
133
133
134
- extension XCBuildMessage . DidUpdateProgressInfo : Decodable , Equatable {
134
+ extension XCBuildMessage . DidUpdateProgressInfo : Codable , Equatable {
135
135
enum CodingKeys : String , CodingKey {
136
136
case message
137
137
case percentComplete
@@ -146,8 +146,8 @@ extension XCBuildMessage.DidUpdateProgressInfo: Decodable, Equatable {
146
146
}
147
147
}
148
148
149
- extension XCBuildMessage . TargetStartedInfo . Kind : Decodable , Equatable { }
150
- extension XCBuildMessage . TargetStartedInfo : Decodable , Equatable {
149
+ extension XCBuildMessage . TargetStartedInfo . Kind : Codable , Equatable { }
150
+ extension XCBuildMessage . TargetStartedInfo : Codable , Equatable {
151
151
enum CodingKeys : String , CodingKey {
152
152
case targetID = " id "
153
153
case targetGUID = " guid "
@@ -164,7 +164,7 @@ extension XCBuildMessage.TargetStartedInfo: Decodable, Equatable {
164
164
}
165
165
}
166
166
167
- extension XCBuildMessage . TargetCompleteInfo : Decodable , Equatable {
167
+ extension XCBuildMessage . TargetCompleteInfo : Codable , Equatable {
168
168
enum CodingKeys : String , CodingKey {
169
169
case targetID = " id "
170
170
}
@@ -175,7 +175,7 @@ extension XCBuildMessage.TargetCompleteInfo: Decodable, Equatable {
175
175
}
176
176
}
177
177
178
- extension XCBuildMessage . TaskUpToDateInfo : Decodable , Equatable {
178
+ extension XCBuildMessage . TaskUpToDateInfo : Codable , Equatable {
179
179
enum CodingKeys : String , CodingKey {
180
180
case targetID
181
181
case taskSignature = " signature "
@@ -190,7 +190,7 @@ extension XCBuildMessage.TaskUpToDateInfo: Decodable, Equatable {
190
190
}
191
191
}
192
192
193
- extension XCBuildMessage . TaskStartedInfo : Decodable , Equatable {
193
+ extension XCBuildMessage . TaskStartedInfo : Codable , Equatable {
194
194
enum CodingKeys : String , CodingKey {
195
195
case taskID = " id "
196
196
case targetID
@@ -215,7 +215,7 @@ extension XCBuildMessage.TaskStartedInfo: Decodable, Equatable {
215
215
}
216
216
}
217
217
218
- extension XCBuildMessage . TaskOutputInfo : Decodable , Equatable {
218
+ extension XCBuildMessage . TaskOutputInfo : Codable , Equatable {
219
219
enum CodingKeys : String , CodingKey {
220
220
case taskID
221
221
case data
@@ -228,8 +228,8 @@ extension XCBuildMessage.TaskOutputInfo: Decodable, Equatable {
228
228
}
229
229
}
230
230
231
- extension XCBuildMessage . TaskCompleteInfo . Result : Decodable , Equatable { }
232
- extension XCBuildMessage . TaskCompleteInfo : Decodable , Equatable {
231
+ extension XCBuildMessage . TaskCompleteInfo . Result : Codable , Equatable { }
232
+ extension XCBuildMessage . TaskCompleteInfo : Codable , Equatable {
233
233
enum CodingKeys : String , CodingKey {
234
234
case taskID = " id "
235
235
case result
@@ -244,7 +244,7 @@ extension XCBuildMessage.TaskCompleteInfo: Decodable, Equatable {
244
244
}
245
245
}
246
246
247
- extension XCBuildMessage : Decodable , Equatable {
247
+ extension XCBuildMessage : Codable , Equatable {
248
248
enum CodingKeys : CodingKey {
249
249
case kind
250
250
}
@@ -287,6 +287,55 @@ extension XCBuildMessage: Decodable, Equatable {
287
287
throw DecodingError . dataCorruptedError ( forKey: . kind, in: container, debugDescription: " invalid kind \( kind) " )
288
288
}
289
289
}
290
+
291
+ public func encode( to encoder: Encoder ) throws {
292
+ var container = encoder. container ( keyedBy: CodingKeys . self)
293
+ switch self {
294
+ case . buildStarted:
295
+ try container. encode ( " buildStarted " , forKey: . kind)
296
+ case let . buildDiagnostic( info) :
297
+ try container. encode ( " buildDiagnostic " , forKey: . kind)
298
+ try info. encode ( to: encoder)
299
+ case let . buildCompleted( info) :
300
+ try container. encode ( " buildCompleted " , forKey: . kind)
301
+ try info. encode ( to: encoder)
302
+ case let . buildOutput( info) :
303
+ try container. encode ( " buildOutput " , forKey: . kind)
304
+ try info. encode ( to: encoder)
305
+ case . preparationComplete:
306
+ try container. encode ( " preparationComplete " , forKey: . kind)
307
+ case let . didUpdateProgress( info) :
308
+ try container. encode ( " didUpdateProgress " , forKey: . kind)
309
+ try info. encode ( to: encoder)
310
+ case let . targetUpToDate( info) :
311
+ try container. encode ( " targetUpToDate " , forKey: . kind)
312
+ try info. encode ( to: encoder)
313
+ case let . targetStarted( info) :
314
+ try container. encode ( " targetStarted " , forKey: . kind)
315
+ try info. encode ( to: encoder)
316
+ case let . targetComplete( info) :
317
+ try container. encode ( " targetComplete " , forKey: . kind)
318
+ try info. encode ( to: encoder)
319
+ case let . taskUpToDate( info) :
320
+ try container. encode ( " taskUpToDate " , forKey: . kind)
321
+ try info. encode ( to: encoder)
322
+ case let . taskStarted( info) :
323
+ try container. encode ( " taskStarted " , forKey: . kind)
324
+ try info. encode ( to: encoder)
325
+ case let . taskDiagnostic( info) :
326
+ try container. encode ( " taskDiagnostic " , forKey: . kind)
327
+ try info. encode ( to: encoder)
328
+ case let . taskOutput( info) :
329
+ try container. encode ( " taskOutput " , forKey: . kind)
330
+ try info. encode ( to: encoder)
331
+ case let . taskComplete( info) :
332
+ try container. encode ( " taskComplete " , forKey: . kind)
333
+ try info. encode ( to: encoder)
334
+ case let . targetDiagnostic( info) :
335
+ try container. encode ( " targetDiagnostic " , forKey: . kind)
336
+ try info. encode ( to: encoder)
337
+ }
338
+ }
290
339
}
291
340
292
341
fileprivate extension KeyedDecodingContainer {
0 commit comments