by veidr · 2y ago · 0 comments
Moving to monorepo is often a win; also the name sucks, we have a a few "monorepos" at work, and I think it's the sweet spot. Rust and C firmware doesn't need to live with TypeScript frontend apps, but it's pretty wasteful to have apps of the same ecosystem unable to share any and all dependencies and utility code trivially.
(Where "trivially" means literally one line of code
import { bleargh } from 'hoge';
and not one single step more.)Instead of e.g., "blah blah blah a monorepo — not necessarily a literal monorepo in terms of having only one repo with every single project in it, but a repo in which several related projects are colocated, and that uses some kind of monorepo tooling like Nx to avoid redundant work — blah blah blah".
This article is also 5 ish years old and I would hope some of the tooling for bigger orgs has started to make it downstream since then.
As parent comment mentioned, scaling welcomes teams to work on tooling.
A mix of Gitlab overall with some Gitolite to manage access to certain branches of the repo if needed seem to be one way to go.
I get monorepos for SSR and the likes but why build and deploy an entire container to push a line of CSS?
Imagine adding a field to a table that must be reflected in the front end and some other micro service consumers. Coordination can be painful.
Each system has its pros and cons, you're going to need tooling either way. I've moved to mono or mega repo as the default and break out smaller pieces into dedicated repo as needed
To me the ability to push changes independent of other pieces far outweighs the extra git commit and push. I've never had the need for any other tooling than a container to run in, git to manage code, and CI/CD for deploys. If there's a need for special tooling to manage the projects there's to much complexity for my taste and I remove the complexity instead.
Your monorepo sometimes approach is the polyrepo approach.
We could look to deploy CSS in a different way to optimize the use case for updating a single CSS line, and deoptimize everything else.
Monorepos make sharing code easier. They don’t put any requirements on deployment. You can make good or bad decisions regarding deployment when using monorepos or multiple repos.
I have only worked in large codebases with monorepo, so I'm curious.
Jenkins creates all the protobuf definitions and pushes them to their dependent repos.
A better way would be with a package repository for them, and having it versioned; and running multiple versions of the backend.