Post

Replies

Boosts

Views

Activity

Reply to Xcode 13 - warning: Could not read serialized diagnostics file: error("Invalid diagnostics signature")
Here are details of the solution that applied in my specific case. I took a look at the output in the Report Navigator ⌘9 (right-most icon at the top of the Navigator pane, which is at the left edge of Xcode). I clicked on the most recent failed build shown in the list, and that produced a detailed list of modules and files that were compiled in the build. I was able to narrow down the problem to a source file in third-party code which was using a symbol that is not yet available to me for my macOS target requiring macOS 11.3. The errant symbol (AttributedString) was found within a conditional compilation block similar to this: #if compiler(>=5.5) @available (iOS 15, macOS12, tvOS 15, watchOS 8, *) extension AttributedString { ... } #end if Fortunately, the maintainers of the third-party code were quick to remedy the problem by further refining the conditional compilation as follows: #if compiler(>=5.5) && !os(macOS) && !targetEnvironment(macCatalyst) @available (iOS 15, macOS12, tvOS 15, watchOS 8, *) extension AttributedString { ... } #end if So before the fix, I got the error that is the subject of this post: warning: Could not read serialized diagnostics file: error("Invalid diagnostics signature") Also before the fix, the accompanying type error was: Cannot find type 'AttributedString' in scope After the fix, these errors went away since the offending symbol was not compiled. So there's a type (such as CLLocation in the original post) that isn't available in the current framework set, but it is being encountered somewhere in source code where maybe it should be conditionally not compiled at all. In my case, the third-party code was being used via Swift Package Manager, so I had to right-click on the package in the Project Navigator ⌘1 and choose "Update Package".
Sep ’21