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 {
634634}
635635
636636fileprivate 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 {
639639 if version == " 2.0.0 " {
640640 return . V2( try JSONDecoder ( ) . decode ( TraceData . TraceFileV2. self, from: data) )
641641 }
@@ -648,12 +648,12 @@ fileprivate func parseTraceData(_ data: Data) throws -> TraceData? {
648648}
649649
650650fileprivate 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 {
652652 return . unknown
653653 }
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 )
657657 if let line {
658658 return . path( filename, fileLocation: . textual( line: line, column: column) )
659659 }
You can’t perform that action at this time.
0 commit comments