DEV Community

Discussion on: Thoughts about monorepos and code-sharing

Collapse
 
willgmbr profile image
William Grasel

Hello Felipe!

First of all, great article! This is a important topic that a lot of companies are facing right now!

I just wanted to discuss a bit of the cos you pointed:

  1. You said it is easier to break things, well I don't think so, monorepo will expose much easier and faster if you broke anything, which is good, but not make it break more than normal. You will always need to have strong automated test suits if you wanna keep your sanity with big projects, no matter if they are in a monorepo or not.

  2. You said we can not deny access to specific developers because we are keeping everything in a single repository, but it is not true. Much of the git providers have some sort of tool to deal with it, like GitHub that has Code Owners:
    help.github.com/en/articles/about-...

  3. Nx gives you a bunch of commands that tests and builds only the affected apps and libs by that pull request, it can give you even a visual graph, and you can programmatic deploy those affected projects. Honestly, looks like you just lose one of the main tools that Nx have for monorepos:
    nx.dev/angular/guides/monorepo-aff...

That said, I am not saying that there is no cons when dealing with monorepos, but they are not those ones.

Once again, congratulations on the article, it is not because I am pointing somethings that it is bad man! 😁