Topics

Mono-repo: What About Submodules?

Trevor.Conn@...
 

Dell Customer Communication

What does the group think of using git submodules with regard to the question of the Go mono-repo?

 

https://git-scm.com/book/en/v2/Git-Tools-Submodules

 

It might require restructuring the repo a bit, but a possible use case is that we put common code in a “root” repo (the cross-cutting logic such as core/domain and support) and then refer to the individual services as submodules of the root (such as data, metadata, command, etc).

 

In this way, a dev can work on the individual service because it will have its own repo OR could work on the whole platform should he/she wish to make changes to cross-cutting concerns to support a feature within a given service. The latter could necessitate a version increment of the whole platform (0.X.y) where X is the root and y is the submodule. The first number (0) could correspond to a milestone release.

 

Trevor Conn

Solutions Architect, Solution Selling

Dell | DCSG

Trevor.Conn@...

Round Rock, TX USA

 

Drasko DRASKOVIC <drasko@...>
 

On Mon, Jan 29, 2018 at 5:51 PM, <Trevor.Conn@...> wrote:
Dell Customer Communication

What does the group think of using git submodules with regard to the
question of the Go mono-repo?



https://git-scm.com/book/en/v2/Git-Tools-Submodules



It might require restructuring the repo a bit, but a possible use case is
that we put common code in a “root” repo (the cross-cutting logic such as
core/domain and support) and then refer to the individual services as
submodules of the root (such as data, metadata, command, etc).
Git submodules are very complex to handle. They are usually avoided in
modern projects. I would strongly advise to avoid them.


In this way, a dev can work on the individual service because it will have
its own repo
Idea that services live in the same repo is not only because of ease
of build, versioning and release management but also to obtain code
integrity. Much more eyes will observe this repo and code reviews will
be much harder to pass. Code quality will be augmented and code style
will be more unified.

Best regards,
Drasko DRASKOVIC
Mainflux Author and Technical Advisor

www.mainflux.com | Industrial IoT Cloud
-------------------------------------------------------------------
Engineering Division | Paris, France

LinkedIn: https://www.linkedin.com/in/draskodraskovic
Twitter:@draskodraskovic