Multirepo vs Monorepo Probably isn't About the Technical Arguments

DRMacIver recently posted about why you should use a monorepo and it generated some discussion. To be fair to DRMacIver, he makes it clear that these views are a result of his experiences. The same disclaimer applies to this post as well.

I have experienced both kinds of setups in my career, and my take-away has been that the technical details don't really matter that much relative to what kind of collaboration incentives the organization offers.

For example, one of my employers did not want teams to work with each other very much, they wanted a minimal amount of collaboration. A monorepo didn't fit that model well. Management found it undesirable if a change one team made affected another team. Management did provide funding for tooling for working with multiple repos, however. There were a lot of tools for understanding the relationship between the repos. Another employer was much more layered with infrastructure teams offering tooling for the feature teams to use. A monorepo worked better there.

In general, I believe a monorepo will run into difficulties if there isn't trust between groups. One employer I had which was in somewhere between a multirepo and monorepo had a group that was often making backwards incompatible changes but not necessarily ones the build system would find and there were no tools to determine what other codebases in the system depended on you. There were tests, sure, but stuff always sneaks through. This group was so bad, my team just ended up moving over to another repo and consuming tagged artifacts. We just didn't have the time or energy to deal with the bugs and management did not reward fixing the bugs you made in this way.

DRMacIver has some good points and solid technical arguments. In the right company culture, I think his points are valid. But, in my experience, when it comes to collaboration the company culture is going to have a much larger impact on how these things work than the technical decisions. If you're in a leadership position in a company, you should probably think about what kind of collaboration you want to fund within your group before deciding if you want a monorepo or multirepo.

Author: orbitz
Updated: 2016-12-03 Sat 17:01