With the caveat that I am not a developer, I was asked a while back why we weren’t using Git submodules for things like our API, webapp, etc.
After looking at http://search.openmrs.org/ I saw that @raff did some investigation about submodules last year in 2013. Issue RA-15 also calls for looking into use of submodules.
I didn’t have a good answer, so wanted to ask here: Should we be using Git submodules? What do you think? Add your comments in this thread.
Some overview reading:
I just discovered git submodule reading your post and pointers, so thanks a lot ! .
I’m only a student and I’ve not enough experience with OpenMRS development or OpenMRS modules to give my point of view, or if it can be useful for us.
Moreover, I’ve personal repo that looks perfectly suited to test submodule. And I think using submodule will make my job easier .
I’ll try to test it (according to my ), and then give you my feedback.
Well, in ID-Dashboard, @elliott already have used the concept of submodule. However, it’s a different approach. That is,
.gitignore the submodule folder, and clone the submodule repo into this folder.
This indeed make things easier.
So I think, since there is a official way to do that. We’d better use it.
After some searching… I found it seems not so charming.
Good point @plypy. However, the reason we chose not to use git submodules
in OpenMRS ID is that Dashboard modules add additional functionality,
rather than providing code that the main repo depends on. My
understanding with git submodules is that they’re meant for treating
separate repos as dependencies.
In regards to the OpenMRS platform, isn’t it best practice in Java/Maven to
separate all components and pull them together in the pom?