We're using CocoaPods in our project and we noticed the compiler fails to build some modules with "Missing required module 'x'" error when built in Swift 6.
I've set up a demo project with some repro steps where there is a CoreFeatureFramework framework that depends on LoggerFramework, a dynamic framework that depends on the external library CocoaLumberjack.
After running pod install, if we try to build, the error only appears when the Swift Language version is set to Swift 6 but not when is set to Swift 5. It seems the issue can be solved by manually adding the search path for CocoaLumberjack in the CoreFeatureFramework build settings or if we add CocoaLumberjack as a dependency of CoreFeatureFramework in the Podfile.
This issue arises as our team is migrating the project from Swift 5 to Swift 6. We have numerous pod dependencies, and almost all modules are affected after setting the language version to Swift 6, resulting in errors and blocking the build.
We'd like to understand the reason behind this behavior and ask for any suggestions on how to deal with this issue.