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 @@ -634,8 +634,8 @@ public final class ClangNonModularCompileTaskAction: TaskAction {
634
634
}
635
635
636
636
fileprivate func parseTraceData( _ data: Data ) throws -> TraceData ? {
637
- if let jsonObject = try JSONSerialization . jsonObject ( with : data) as? [ String : Any ] ,
638
- let version = jsonObject [ " version " ] as? String {
637
+ let jsonObject = try PropertyList . fromJSONData ( data)
638
+ if let version = jsonObject. dictValue ? [ " version " ] ? . stringValue {
639
639
if version == " 2.0.0 " {
640
640
return . V2( try JSONDecoder ( ) . decode ( TraceData . TraceFileV2. self, from: data) )
641
641
}
@@ -648,12 +648,12 @@ fileprivate func parseTraceData(_ data: Data) throws -> TraceData? {
648
648
}
649
649
650
650
fileprivate func parseTraceSourceLocation( _ locationStr: String ) -> SWBUtil . Diagnostic . Location {
651
- guard let match = locationStr. wholeMatch ( of: #/(.+):(\d+):(\d+)/# ) else {
651
+ guard let match = locationStr. wholeMatch ( of: #/(?<filename> .+):(?<line> \d+):(?<column> \d+)/# ) else {
652
652
return . unknown
653
653
}
654
- let filename = Path ( match. 1 )
655
- let line = Int ( match. 2 )
656
- let column = Int ( match. 3 )
654
+ let filename = Path ( match. filename )
655
+ let line = Int ( match. line )
656
+ let column = Int ( match. column )
657
657
if let line {
658
658
return . path( filename, fileLocation: . textual( line: line, column: column) )
659
659
}
You can’t perform that action at this time.
0 commit comments