Xcode 16.1: Swift macro killing indexing performance?

I'm working on a project with several dozen targets and a Swift macro. Due to the purpose of the macro (generating Codable boilerplate), pretty much all targets depend on it. The project is generated with XcodeGen.

Since upgrading to 16.1 (I think), Xcode has basically turned into a glorified TextEdit for me: refactoring, symbol navigation and search don't work. Also, I'm getting a lot of ghost errors that keep popping up hours after I fix them, while at the same time new build errors never show up in the error navigator, so I have to check the build log to see why the build failed.

I noticed that project indexing is taking a very long time. As a troubleshooting step, I tried deleting DerivedData (which afaik includes the index) to see if this fixes the problem. Xcode started indexing the project from scratch, and if the progress indicator is to be trusted, After ~40 minutes it's only about 1/3 done. For every target Xcode seems to be spending a lot of time indexing SwiftOperators, SwiftDiagnostics, SwiftParser. I'm assuming these are related to the macro.

Does anyone else have this problem? Unfortunately, I can't confirm this is caused by the macro, removing it from the project and seeing if this fixes the issue seems infeasible.

Xcode 16.1: Swift macro killing indexing performance?
 
 
Q