File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Sources/SWBTaskExecution/TaskActions Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -617,8 +617,8 @@ public final class ClangNonModularCompileTaskAction: TaskAction {
617
617
}
618
618
619
619
fileprivate func parseTraceData( _ data: Data ) throws -> TraceData ? {
620
- if let jsonObject = try JSONSerialization . jsonObject ( with : data) as? [ String : Any ] ,
621
- let version = jsonObject [ " version " ] as? String {
620
+ let jsonObject = try PropertyList . fromJSONData ( data)
621
+ if let version = jsonObject. dictValue ? [ " version " ] ? . stringValue {
622
622
if version == " 2.0.0 " {
623
623
return . V2( try JSONDecoder ( ) . decode ( TraceData . TraceFileV2. self, from: data) )
624
624
}
@@ -631,12 +631,12 @@ fileprivate func parseTraceData(_ data: Data) throws -> TraceData? {
631
631
}
632
632
633
633
fileprivate func parseTraceSourceLocation( _ locationStr: String ) -> SWBUtil . Diagnostic . Location {
634
- guard let match = locationStr. wholeMatch ( of: #/(.+):(\d+):(\d+)/# ) else {
634
+ guard let match = locationStr. wholeMatch ( of: #/(?<filename> .+):(?<line> \d+):(?<column> \d+)/# ) else {
635
635
return . unknown
636
636
}
637
- let filename = Path ( match. 1 )
638
- let line = Int ( match. 2 )
639
- let column = Int ( match. 3 )
637
+ let filename = Path ( match. filename )
638
+ let line = Int ( match. line )
639
+ let column = Int ( match. column )
640
640
if let line {
641
641
return . path( filename, fileLocation: . textual( line: line, column: column) )
642
642
}
You can’t perform that action at this time.
0 commit comments