My app SolarWatch has two framework targets, SolarKit for iOS and SolarKitWatch for watchOS. For the iOS app both the app and widget extension depend on SolarKit. For the watchOS app only the watch app extension used to depend of SolarKitWatch. Everything used to build fine.
Today I added a widget extension for watchOS which depends on SolarKitWatch. This resulted in builds starting to fail because watch widget extension was unable to find SolarKitWatch-Swift.h during SwiftEmitModule step, using Xcode 14 beta 6 (14A5294g)
According to the build timeline this failure is happening after the Planning target SolarKitWatch steps for both arm64 and arm64_32 architectures. But it seems like the SolarKitWatch-Swift.h has not been created at that step yet.
One workaround is to manually build the SolarKitWatch target before building the whole app but this only works for debug builds and not archive builds.
I spent half a day trying to figure this out but nothing worked except turning off parallelizeBuildables and buildImplicitDependencies.
Is there a setting which I can use to enforce a build order besides turning off all parallelization?