Frequent build errors when changing the simulator and/or git branch

Originator:revoltes666
Number:rdar://FB9071199 Date Originated:Apr 7, 2021 at 12:19 PM
Status:Open Resolved:No
Product:Xcode Product Version:12.5 beta 3 (12E5244e)
Classification:Bug Reproducible:Yes
 
I updated to the latest beta version of Xcode and it often fails to build my app, usually when I change the git branch and/or the simulator, but I didn't pay enough attention to know exactly which of these trigger the issue.

One example of build failure error is:
> Module file '/Users/revolt/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/J3JDK8UPXZ4K/Foundation-39SXNSRMYWPGZ.pcm' is out of date and needs to be rebuilt: signature mismatch

Deleting the `DerivedData` directory fixes it temporarily. It was not happening in Xcode 12.4.

Comments

Apple

Thank you for your reply. It is possible we were unaware of the workaround when the release notes were posted. Via Feedback Assistant, we kindly ask that you file a separate feedback against the documentation, asking that the workaround be properly documented.

By revoltes666 at June 17, 2021, 10:48 p.m. (reply...)

Iulian Onofrei

Shouldn't this issue and workaround be added to a "Known Issues" section from the Xcode 12.5 release notes then?

https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-release-notes

By revoltes666 at June 17, 2021, 7:41 p.m. (reply...)

Apple

Thank you for your status request.

We are still working towards a way to resolve the issue reported. However, there is a workaround that you could employ. The workaround is to disable the global module index by adding -fno-modules-global-index to OTHER_CFLAGS.

The current status of your Feedback can be viewed in Feedback Assistant under Resolution. Here you can track if the report is still being investigated, has a potential identifiable fix, or has been resolved in another way.

For more details on Feedback Status, please see "Understanding the Status of Your Feedback" linked here: https://developer.apple.com/bug-reporting/status/

By revoltes666 at June 17, 2021, 5:55 p.m. (reply...)

Iulian Onofrei

This happens in Xcode 12.5 (12E262) too, and it's breaking our CI too!

By revoltes666 at June 17, 2021, 5:55 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!