Xcode 13 indexing corrupting files

Hi,

I have a build target with custom build rules to generate some header files from input files to be used in later stages of the build process. For example .cl OpenCL kernel source files get converted to a .gh header file. At some point the .gh file get a size of zero. When I remove these file and open the project in Xcode again the zero size files will show up again. When I do a build these files get generated again but will then be replaced by the zero size files again causing errors later in the build process. Is seems to have to do with the indexing. When I disable indexing with: defaults write com.apple.dt.XCode IDEIndexDisable 1 The zero sized files do not reappear when I open the project again with Xcode. Looks like a Xcode bug to me, are there people encountering the same isse?

Xcode 13 indexing corrupting files
 
 
Q