Git submodules in own library

#1

Hi, I have this driver which is in a git repo A and added Mongoose-OS specifics in another repo B, which includes this repo A as a submodule.
There is no mos.yml file in repo A
The mos.yml file in repo B adds the include and src paths to repo A

If I recursively clone repo B, add this to deps/ and add the proper ‘- name: repoBname’ to mos.yml, then mos build works OK and I get my code as expected.

If I just add the proper URL to my mos.yml file ( - origin: repoBurl ), then mos build fails, it doesn’t find the includes in repo A, as if it wasn’t initializing submodules.
Repo B branch name is ‘master’.
Repo A branch name is ‘main’ (it is intended to be nested from other modules and I left Github default).
Suggestions ?

#2

Well, for anyone interested, I assumed submodules were not supported and changed my layout to a subtree.
A subtree is still linked to a commit in the other repo and can be easily updated, files do reside at both repositories so there is no need to recursively pull.
This works OK.

#3

Nice, I’ve not used git submodules with Mongoose but avoid them generally since I always come up against some kind of quirk. Thanks for sharing your solution