Currently, kdesrc-build does not respect when Git repositories have submodules and one has to checkout all of them by hand and update them by hand. I see two possible ways how to provide this feature: 1) by default handle every repository as it had submodules: "git clone --recursive" should not be disruptive as well as "git submodule update --recursive" should not harm a repository with submodules IMHO 2) provide an option for the Git call of a module to specifically enable submodule handling. Reproducible: Always
Is this for Qt5? Reason I ask is that I can imagine good reasons why someone would not want to have git automatically pull down every possible Qt5 submodule just because someone was innocently meaning to get qtbase. So assuming we go with making it an option, the way I would probably implement this would be to refactor the existing Updater::Git module (in modules/ksb/Updater/Git.pm) to allow for customization of clones and updates, make a subclass of Updater::Git that uses the customization to actually conduct a submodule-aware clone/update/etc., and then have an option for the module that causes kdesrc-build to create the new subclass instead of Updater::Git when creating the scmType for the module (probably in ModuleSet.pm's _initializeNewModule). This does leave open the difficulty that this would only work with non-"KDE Project" modules (which are already a separate subclass) but this seems fine given our current git repository structure, unless you know of other places where submodules are used for KDE repos.
Sorry for the late answer, completely forgot about this :/ Qt5 would be an example where I could imagine to use it. With Qt's own configuration system however, I am not sure how easy it will be to build it with kdesrc-build. My specific use case is that I would like to add QtCreator to kdesrc-build, which uses submodules. Within KDE I cannot recall any use of submodules except the kf5-books project (which is a very special corner-case that we do not have to add to kdesrc-build :) Deactivating it by default seems completely fine for me.
*** Bug 418259 has been marked as a duplicate of this bug. ***
Duplicates https://invent.kde.org/sdk/kde-builder/-/issues/40