by trollied · 4y ago · 0 comments
I don't actually understand this. You can do this with git submodules. It's just a directory structure. Can somebody please explain? If the problem is committing to multiple things at the same time for a point-in-time release, then the answer is tags. Rather than terabytes of git history for a gigantic organisation that has many unrelated projects.
A good example for you: Google releases the Google Ad Manager API externally periodically, with dated releases. How does having that in a huge monorepo make sense?
It's effectively just a pointer to a hash, and ends up being useless for versioning + a really nice footgun for tracking upstream updates.
The monorepo vs manyrepo tradeoff boils down to this:
Do you want more complicated build + deploy tooling or do you want more complicated dependency management?
If the former, pick monorepo. If the latter, pick manyrepo.
Edit: submodules IS a viable solution for truly third-party repos over which you have no control and don't expect to ever edit.