We have a large project with dozens of sub-projects and different targets. These targets differ in user interface for different feature sets with a large block of shared code between these targets. The subprojects is a mix of static libraries, Custum Framework, which are written in Swift, ObjectiveC, ObjectiveC ++, C ++, C. We are currently working on porting the ObjectiveC part of the apps to Swift.
Most of the time when we are switching from one target to the other we are facing this kind of error during the compilation of swift code.
This happens in all Xcode 10 and Xcode 11 version (even in the latest Beta)
<unknown>:0: error: module 'XXXX' is defined in both '/Users/abc/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/2ZWTI7P1QZ7I1/XXXX-KFQM8A0MFP4Q.pcm' and '/Users/abc/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/2ZWTI7P1QZ7I1/XXXX-2OMJXFAAVMK3W.pcm'
<unknown>:0: error: cannot load underlying module for 'XXXX'
Does anyone have any idea what triggers the generation of the different .pcm files? Or how the hash of the pcm is calculated so that I can search for the cause.