I’m experimenting with trying to use separate module maps in my three include directories, as a possible alternative to my one module map approach in a common parent directory.
Isn’t there some way we could support cyclic dependencies in building modules?
It seems that cycles are okay in sub-modules, but not in top-level modules.
It seems the only way to work around having cycles in separate directories is to make lots of smaller top-level modules. But then because they are not submodules any more, cycles within an include directory start popping up. For example:
While building module ‘limits’ imported from target/include/srclimits_h.cpp:1:
While building module ‘xstddef’ imported from D:\usr\local\psp2\ORBIS SDKs\2.000_pre_mod/target/include/limits:17:
While building module ‘initializer_list’ imported from D:\usr\local\psp2\ORBIS SDKs\2.000_pre_mod/target/include/xstddef:162:
While building module ‘type_traits’ imported from D:\usr\local\psp2\ORBIS SDKs\2.000_pre_mod/target/include/initializer_list:5:
In file included from :1:
D:\usr\local\psp2\ORBIS SDKs\2.000_pre_mod/target/include/type_traits:12:10: fatal error: cyclic dependency in module
‘xstddef’: xstddef → initializer_list → type_traits → xstddef
D:\usr\local\psp2\ORBIS SDKs\2.000_pre_mod/target/include/initializer_list:5:10: fatal error: could not build module
D:\usr\local\psp2\ORBIS SDKs\2.000_pre_mod/target/include/xstddef:162:11: fatal error: could not build module 'initializer_list' #include <initializer_list> Or is using lots of small top-level modules a bad idea because of the cost in performance when dealing with separate module files? I would also like to minimize major changes to the headers. Thanks. -John