This content originally appeared on Level Up Coding - Medium and was authored by Brian Winkers
In my previous article, I discussed how moving to a monorepo made sharing code between pieces easier. In this article, I discuss places where using a monorepo hasn’t worked well.
TLDR
A monorepo may be a bad fit if:
- It is an open source project.
- Using merge-triggered deployments.
- Working on different features in multiple parts at the same time.
- User access needs are different.
- Many end users only need a small part of the code.
We moved out the things that didn’t fit and left the rest in a core repo.
Open Source Projects
It seems onerous to force developers to download any more code than necessary to contribute. It uses extra bandwidth and local storage and that matters to people.
Merge-triggered Deployments
A common paradigm supported by many services is branch-based deployments, merging code into a branch like production triggers a deployment. Netlify and others use this paradigm to make deploying static sites incredibly easy.
The problem comes when using the default deployment processes you end up with each project in the monorepo getting rebuilt on each merge into production, even if there were no changes. This wastes valuable build minutes and increases some chance for errors breaking a service that hadn’t even changed.
Working on Features in Multiple Parts at the Same Time
I found myself making changes in parts that weren’t production ready, just to support current development in another part. Those changes could get lost or worse, committed. It is more productive to choose when I commit changes to each part.
Different User Access Permissions
Many git process don’t support the fine grained permissions on sub-directories. Multiple repos make it easier to define what code each person should be able to access.
End Users Only Need a Small Part of the Code
Most users of TachyonCMS won’t ever need to access the editor code outside of visiting TachyonCMS.org with their browser. Many will want to publish the content they create using the Flow Sites Server to serve semi-static content. That is a much smaller part of the code.
The Downside of Monorepos was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Level Up Coding - Medium and was authored by Brian Winkers
Brian Winkers | Sciencx (2022-07-01T18:08:29+00:00) The Downside of Monorepos. Retrieved from https://www.scien.cx/2022/07/01/the-downside-of-monorepos/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.