Monorepos don't map to our social structure

I broadly agree with this. Splitting the repo up also introduces more opportunity for things to get out of sync, PRs in one repo may depend on PRs in a different repo entirely, independent maintainers struggle to keep up with nixpkgs, packages receive even less scrutiny than before, and it becomes impossible to keep an eye on everything happening in this complex interconnected web of dependencies.

Packages do not exist in a vacuum, and neither do we.

8 Likes

FWIW the messages mentioning pijul in this topic should be split out into a separate topic. It’s kinda sad that discourse doesn’t have reply-to-thread-with-subject-line-change, which is the way of signaling a new subthread in email discussions. Sigh yet another 1980s innovation that seems to have been forgotten. Anyways the pijul discussion is not just orthogonal to the monorepo discussion, but sort of transcends it – there is no pijul submodule or josh-for-pijul because these things are unnecessary.

The joke goes: two git users are arguing, heatedly, about monorepo vs multirepo. A pijul user drifts by, saying

the-matrix-there-is-no-spoon-0

13 Likes

What exactly is needed? To me, two years is not a huge amount of time.

I don’t know how the conversation ended up on pijul when the OP was about eliminating the board and monorepo… but anyway, I don’t think pijul is a serious option.

On a tmpfs:

$ time pijul clone https://nest.pijul.com/pijul/pijul
Repository created at /tmp/tmp.dSyrVH5tU1/pijul
Downloading changes  [==================================================] 1053/1053 [00:00:12]
Applying changes     [==================================================] 1053/1053 [00:00:16]                                                     Downloading changes  [==================================================] 1053/1053 [00:00:00]
Completing changes... done!                                                                                                                        
real	0m19.583s
user	0m8.949s
sys	0m0.618s

$ time pijul clone pijul pijul-copy
Repository created at /tmp/tmp.dSyrVH5tU1/pijul-copy
Downloading changes  [==================================================] 1053/1053 [00:00:03]
Applying changes     [==================================================] 1053/1053 [00:00:07]                                                     Downloading changes  [==================================================] 1053/1053 [00:00:00]
Completing changes... done!                                                                                                                        
real	0m8.737s
user	0m8.447s
sys	0m0.454s

Even a local, in-tmpfs clone took nearly 9 seconds for the clone of only 1k changes. And I think I have a quite decent CPU (Ryzen 5700X). Extrapolating this to the 640k commits that nixpkgs currently has, assuming (optimistically!) linear scaling, that’d be 1.48 hours for a local clone. Network speed and even disk I/O are huge variables, but in the end, will only make those times massively worse.

Meanwhile, with git:

$ time git clone file://$PWD/nixpkgs nixpkgs-copy
Cloning into 'nixpkgs-copy'...
remote: Enumerating objects: 4930209, done.
remote: Counting objects: 100% (4930209/4930209), done.
remote: Compressing objects: 100% (949117/949117), done.
Receiving objects: 100% (4930209/4930209), 877.36 MiB | 72.31 MiB/s, done.
remote: Total 4930209 (delta 3616600), reused 4928000 (delta 3614680), pack-reused 0 (from 0)
Resolving deltas: 100% (3616600/3616600), done.
Updating files: 100% (41804/41804), done.

real	2m40.512s
user	7m50.344s
sys	0m33.091s

About 33x faster. And even nowadays, we consider the barrier to contribution quite high, as people don’t know about blobless clones, or just don’t have the network bandwidth and stability to download gigabytes of data.

4 Likes

Well, it looks like a nice use case for improvements!

I’ve just made a quick draft proposal to split lib into a separate repo!

8 Likes

So this is something similar to what Project Ekala but on a way smaller scale, if I understand correctly?

I would say that this is similar to any kind of projects growing.

You might want to have a look at at Auxolotl’s lib. The project is not very active at the moment, but they made some good progress on things.

Somewhere the initiator @jakehamilton made a video about it and I think the ideas were very good. It’s been a while since I watched it, but it was (to me) quite impressive.

2 Likes

Aux Lib hasn’t been worked on for a few months, but it is pretty much done. It won’t be changing much if at all and is already used by the binary bootstrap and package/module set. Should be solid reference for an extracted version of the Nixpkgs lib.

6 Likes