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 {
617617}
618618
619619fileprivate 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 {
622622 if version == " 2.0.0 " {
623623 return . V2( try JSONDecoder ( ) . decode ( TraceData . TraceFileV2. self, from: data) )
624624 }
@@ -631,12 +631,12 @@ fileprivate func parseTraceData(_ data: Data) throws -> TraceData? {
631631}
632632
633633fileprivate 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 {
635635 return . unknown
636636 }
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 )
640640 if let line {
641641 return . path( filename, fileLocation: . textual( line: line, column: column) )
642642 }
You can’t perform that action at this time.
0 commit comments