I very recently migrated our project on Swift 6. After fixing every issues, mostly due to Swift Concurrency, I’m getting the following error when compiling with Xcode 16.0, which doesn’t make any sense to me :
Multiple errors: file cannot be open()ed, errno=2
path=/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/Router.o in '/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/Router.o';
file cannot be open()ed, errno=2
path=/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AccountRouter.o in '/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AccountRouter.o';
file cannot be open()ed, errno=2
path=/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AlertRouter.o in '/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AlertRouter.o';
file cannot be open()ed, errno=2
path=/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AlarmRouter.o in '/Users/.../Library/Developer/Xcode/DerivedData/MyApp-euxwyncffackymerzuntbjccezyq/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/AlarmRouter.o'
(The '…’ is just me obfuscating the real name)
I’ve checked the paths. The file are here and I can open them.
I tried cleaning the project, removing every derived data. I removed every dependencies (cocoapods & SPM). I’m using Tuist, so I fully cleaned the project and recreated it from scratch. Then I thought it might be an issue with my Xcode installation, so I tried running the project on another machine, I still get the same error every time.
Anyone has a clue on what’s happening?