DEV Community

Discussion on: Why might a project/company use a monorepo?

Collapse
 
tiguchi profile image
Thomas Werner

I'm curious about what others have to say about the pros. So far I'm not really convinced except for bundling back and frontend applications of the same web app in the same repo. :-/

I think as software developers we should be striving for modularization and separation of concern. Having everything in the same repository doesn't look like that to me, and it feels a bit odd that there is that big directory of everything which keeps on growing and growing the more projects you add to the mix. Is there an end in sight? What about pull / push performance?

Directory aesthetics aside, one counterargument against monorepo that crosses my mind might be access control.

Probably depends on the situation but not everyone in the organization needs or should have free access to everything. That's easier to control when repositories are separate.

Also if your company works for various clients and one client requests access to their source code (and change history), maybe because they want to take over or hand it over to another software development company, you cannot just give them access to that one project directory of theirs in that big monorepo. That would be awkward. Possibly also causes a whole bunch of contract breaches. And if the commit history contains cross-references to other client's code and source files due to monolithic monorepo commits... that could also cause awkward situations.

Personally I've dealt with monorepos only at a time where SVN didn't make the vast majority of programmers cringe in disgust. It's interesting that this becomes fashionable again.