Hi all,
I'm in the process of experimenting with crossimportmodule as a potential path forward for our modular project.
To the extent that I've looked at the proposal and experimented, I've come this far along:
- I have declared a
swiftcrossimportthat is being properly placed in the same directory as themodulemapin the build.framework. - I have declared a new framework,
_ModuleA_ModuleBthat correctly@_exports import ModuleAandimport ModuleB. - In files that have both
import ModuleAandimport ModuleB, the cross-import dynamic lookup table is being correctly consulted, andimport ModuleAis being replaced as expected withimport _ModuleA_ModuleB.
However, if I have not already manually built _ModuleA_ModuleB, there will be nothing that will trigger the build of that module as it's not declared as an explicit dependency of the current module/project. Is this intended? If so, I assume I am meant to declare in my dependency structure an explicit dependency on _ModuleA_ModuleB -- and assuming "yes", how is that better/different from just declaring a standard module? If not, then how can I inform the compiler to build this module?
(Edit: for the sake of clarity, I'm using an xcodeproj, generating my project using xcodegen, and manually declaring dependency structure for frameworks and app targets via xcodegen not SPM)