I was editing the view when this started happening, but no fiddling I've done with it since has fixed the issue.Compiling failed: 'main' attribute cannot be used in a module that contains top-level code
I have tried:
Reverting all changes in Git
Cleaning the build folder (repeatedly)
Touching both the file with the SwiftUI view, and the AppDelegate that's annotated with @main
Closing the project, and Xcode
I had been working in Xcode 12.5 beta 2 when the problem started, but it persists when I open the project in Xcode 12.3.
Is there some extra build cache that I can go purge?