News for hackers. Stuff that matters.
Re:Just Use a Monorepo by ankitdce on Thursday January 12, 2023 @08:42PM (#34362909)
For everyone who complains about monorepos, remember some of the most forward thinking engineering companies like Google and FB also use monorepos. All the arguments that people make in favor of polyrepo are making so because of lack of strong tooling for monorepos. That's also why Google and FB would not have scaled if they were using GitHub / GitLab but had to build their own. Also Google's original source control was built on top of perforce!
Re:Just Use a Monorepo by scarmig on Thursday January 12, 2023 @08:53PM (#34362993)
The issue with building a custom monorepo system that can handle Google's and Facebook's scale is that it fails to scale down, even to moderately large project and organizational size. It's expensive (think at least 7 figures opex) and not what most people should be doing.

git, for all its issues (and I'm a git-hater), scales down to an individual coder and scales up (with a lot of hacks, the hacks being used varying depending on whether you're taking a poly or mono approach) to companies that employ thousands of developers.

Re:Just Use a Monorepo by andromeduck on Thursday January 12, 2023 @09:04PM (#34363078)
Would be nice if google3 as a service were a thing.
Re:Just Use a Monorepo by JTBooth on Thursday January 12, 2023 @09:57PM (#34363440)
google3 and Plex! God how I miss working with Plex, I didn't know how good we had it.
Re:Just Use a Monorepo by 8n4vidtmkvmk on Friday January 13, 2023 @02:59AM (#34365083)
Plex the home media server, or something else?
Re:Just Use a Monorepo by Rastonbury on Friday January 13, 2023 @05:24AM (#34365980)
I think it's an internal Google tool
Re:Just Use a Monorepo by hbrn on Friday January 13, 2023 @12:58AM (#34364431)
Polyrepo scales to thousands coders without anyone even noticing, and that's the beauty of it.

Just look at the size of node_modules in an average project. You stand on the shoulders of thousands of other engineers and you don't even think about it. That's your polyrepo at work.

Now imagine that every time a dependency wants ship a new version, their maintainers have to update all of the dependents. That's your monorepo.

It is quite obvious which one is more scalable.

The only real benefit monorepo has is that every dependency is always at it's latest version. But the cost to achieve that... let's just say there's a reason you mostly hear about monorepos from Google.

Re:Just Use a Monorepo by afavour on Thursday January 12, 2023 @08:50PM (#34362969)
> remember some of the most forward thinking engineering companies like Google and FB also use monorepos

As a counterpoint though I’d say that the issues Google and FB face, particularly in terms of the sheer scale of the work they’re doing, is pretty unique.

Google literally invents programming languages for domains it feels needs them, I’m not about to blindly follow that practise either.

Re:Just Use a Monorepo by fargo on Thursday January 12, 2023 @08:47PM (#34362948)
They way at least FB is using a monorepo is very different than any kind of monorepo most people imagine. It's not just about tooling, git itself could never handle it. I am all about using a monorepo but Google and FB having one is not the an argument for it.
Re:Just Use a Monorepo by phyrex on Thursday January 12, 2023 @09:58PM (#34363452)
how so?
Re:Just Use a Monorepo by threeseed on Thursday January 12, 2023 @08:49PM (#34362966)
a) There is no correlation between mono/poly repos and your ability to scale. There are many examples of successful companies using either approach.

b) As a general rule people should be cautious about adopting approaches and technologies from Google, Meta without a clear understanding of why they need it. What works at their scale doesn't always apply to smaller teams.

Re:Just Use a Monorepo by slotrans on Thursday January 12, 2023 @08:57PM (#34363024)
Ah yes, the old "if FAANG does it, it must be right" argument. You love to see it.
Re:Just Use a Monorepo by tourist2d on Thursday January 12, 2023 @10:03PM (#34363484)
That's not what they said at all. You love to see people unable to read a couple of sentences before jumping to their own conclusion.
Re:Just Use a Monorepo by qznc on Friday January 13, 2023 @05:23AM (#34365973)
Amazon does polyrepo by the way. Unfortunately, they don’t talk about it.
Re:Just Use a Monorepo by hbrn on Friday January 13, 2023 @12:49AM (#34364392)
For anyone who complains about dictatorships, remember some of the most resource-abundant countries are dictatorships.

Those companies should be one of last places to look for good software development practices. They have absolutely no incentive to recognize their own mistakes.

Re:Just Use a Monorepo by agos on Friday January 13, 2023 @05:29AM (#34366008)
didn't meta need to switch to mercurial and a custom extension for it because they were not able to make it work with git?
Re:Just Use a Monorepo by Shish2k on Friday January 13, 2023 @07:57AM (#34367070)
IIRC originally neither mercurial nor git would scale enough, but mercurial was much more willing to accept scalability-related patches, so long as they didn’t harm the more common small-scale use-cases. After a couple of years of submitting patches for moderate improvements, meta wanted to make some more controversial large-scale changes like dropping support for sequential commit numbers, and ended up hard-forking and breaking compatibility to do that. That incompatible-but-better-performing fork then stayed internal for a while, before recently being released as Sapling.

As a bonus, part of the rewrite of the internal storage engine involved creating a storage engine abstraction layer, which in turn made it easy to add Git as a backend :D