I was having this issue with 13.2 and 13.3 beta. I'm developing a SwiftUI package.
Any compiler error caused the problem, and the detailed compiler error can only be found in the stack trace for the Uncategorized error.
I can insert any compiler error to make this occur, then if I remove the error there is no issue as its only affecting error reporting. The file "PropertyEditorViewModel.swift" does not have any compilation errors, but the warning is that diagnostics cannot be read for it.
I fixed this by moving some of the code in PropertyEditorViewModel.swift to a different file. After doing this, I receive correct compilation errors.
I will not go into the details of the moved code apart from noting that it is not the main class in that file, but a class that implements a separate generic protocol referred to in the main class.
I take it that the compiler is struggling with the unrelated classes in the original source file and pulling them apart into separate files helps the compiler when it needs to process diagnostics. Simplification fixed the problem for me.
Topic:
Programming Languages
SubTopic:
Swift
Tags: