DEV Community

Discussion on: Why should you use a monorepo for your Product?

Collapse
 
lefttwixwand profile image
Vladyslav Horbachov • Edited

In 99.9999999% I hate monorepos.
It might be good at the start of your project, but at one point of time it might become a hell for developers to work in such space.
There are few things, which I don't like:

  • "Reusable" or "Common" infrastructure, like building, packaging and testing tools might limit your flexibility. Works - so don't touch it🀑 will be number 1 argument stopping you from some improvements. You want to change some tools to newer and more efficient? - you won't be able to do it step by step. You'll have to apply the change to all the projects in your repo, and the chance of something is going wrong is extremely high. The same is relevant not only for changing existing, but for adding something new. You always have to take in consideration the existing environment.
  • What if some of the projects in the monorepo require more flexible approach, then the other ones? For example - you want to deploy one specific project out of a bunch of others. How to do it? Be ready to create a separate pipeline for each project. As well as adding separate git tags to track changes and versions of each project in the repo.
  • Dirty git history and terrible navigation between version is what you'll see regularly with a monorepo.
  • And the last thing, which infuriates me the most - IT'S A MONOREPO!!!!
    • Your repo is quite big.
    • You're tracking the entire repo with tons of changes, which might be done by a different team and not affect you at all.
    • From my experience: when you want to build a part of the project - you're going to build the entire solution, just because "why not?". We have a common build infrastructure, so let's build all at onceπŸŽ‰