What does HackerNews think of sapling?

A Scalable, User-Friendly Source Control System.

Language: Rust

Facebook uses mercurial across the board, at least from what I saw a couple years back. A good chunk of the large file / large repo has been open sourced as EdenFS [1] which uses file notifications to update the status as you make changes to amortize the cost so that it’s already computed by the time you query (watchman is integrated). That being said, very few code bases grow to this size unless you are a major tech company and have a single mono repo (with a few major OSS projects as notable counter examples).

[1] https://github.com/facebookexperimental/eden

Maybe at their scale it makes more sense to switch to a VCS like Eden? https://github.com/facebookexperimental/eden

Eden's equivalent of 'git status' should run almost instantaneous, as checkouts are hosted by a virtual file system (FUSE) that tracks changes.

Meta having moved on from Mercurial may be a factually true comment, but it looks like they still have fondness for Mercurial's ways:

https://github.com/facebookexperimental/eden

> - A build system / package manager like Nix [1] but with a better user experience / more straightforward command-line tooling.

Working on it :)

> - A version control system which scales to petabytes or more. Something that I could put large video files in without thinking twice about it. Something a large company could use for their monorepo—or even their data warehouse.

https://github.com/facebookexperimental/eden

> A note-taking tool that allows me to organize notes in a graph with links between them

https://www.orgroam.com/

Is Facebook still using mercurial? It seems that there was a blog post about it in 2014, but their repo[0] just seems to say that their codebase was originally based on/evolved from mercurial.

[0] https://github.com/facebookexperimental/eden

And then from mercurial extensions to our own server, mononoke, which apparently has been moved under the Eden umbrella: https://github.com/facebookexperimental/eden
> In most orgs that I've been a part of, no language tends to meet the standard for consideration until it has been the core of at least one very large public software project.

> So far the largest things we know of built with it are Servo's CSS engine and the NPM authentication service.

Here are some others, for your consideration:

* Dropbox's storage layer: https://dropbox.tech/infrastructure/extending-magic-pocket-i...

* CrosVM is an important part of ChromeOS https://chromium.googlesource.com/chromiumos/platform/crosvm...

* Firecracker is the underlying tech of AWS Lambda and Fargate https://firecracker-microvm.github.io/

* More coming from Amazon I don't have the ability to easily cite just yet, I hope the re:Invent recordings go up somewhere sometime soon

* "EdenSCM is the primary source control system used at Facebook,": https://github.com/facebookexperimental/eden

There's a bunch of other stuff too, of course. Apple has been hiring, but I don't think their usage is public yet. Microsoft is hiring rustc hackers, and has some other stuff going on. And tons of other stuff that may count as "large" depending on how you define it.

microsoft: in 2017, the Windows git repo contained ~3.5 million files & used 300GB when checked out as a git repo [1], In 2020, the Office git repo contained ~3 million files [2].

facebook: In 2011, the main site had around 9.2 million lines of code "excluding numerous backend services" [3]. In 2014 the android codebase was 4 million lines of code and the main site without backend code was 62 million lines of code [3]. In 2014, when facebook were talking about scaling mercurial, the main source repo was described as "many times larger than even the Linux kernel, which checked in at 17 million lines of code and 44,000 files in 2013". Around 2018 (?) facebook started using "eden", a fork of mercurial [5].

If we make the working assumption that expected lines-of-code / file of 2013 linux kernel is representative of all repos, then that gives around 386 lines-of-code / file.

loc(microsoft) >= loc(windows in 2017) + loc(office in 2020) ≈ 386 loc / file * (3.5m + 3m) ≈ 2.5 billion lines of code

The linked blog posts from microsoft & facebook talking about scaling version control systems are fairly interesting!

[1] https://devblogs.microsoft.com/bharry/the-largest-git-repo-o... [2] https://devblogs.microsoft.com/devops/introducing-scalar/ [3] https://www.quora.com/How-many-lines-of-code-is-Facebook [4] https://engineering.fb.com/core-data/scaling-mercurial-at-fa... [5] https://github.com/facebookexperimental/eden

As a fellow Facebook employee, FYI, Hacker News is not a great place to get tech support.

For the benefit of everyone else on this thread, note that Facebook uses https://github.com/facebookexperimental/eden. From the README:

> Despite having originally evolved from Mercurial, EdenSCM is not a distributed source control system.

i.e., this is not "stock" Mercurial. For example, the Eden server (Mononoke) is written in Rust and the complementary virtual filesystem is written in C++. This has very different performance characteristics than real Mercurial.

EdenSCM works with both EdenFS (the custom filesystem) and a traditional filesystem. If you use EdenFS, pulls will be much cheaper because you only fetch what you use. If you use a traditional filesystem, EdenSCM supports the same "sparse checkouts" feature as stock Mercurial (https://firefox-source-docs.mozilla.org/build/buildsystem/sp...), which can also be used to reduce the size of the slice of the monorepo you pull down.

Last I checked, Perforce (and Google's "implementation" of Perforce, Piper) did not provide nearly the same level of support for stacked diffs as Eden. As both Google and Facebook have cultures of pre-commit code review, working with stacked diffs makes it much easier to make progress while waiting for approvals on earlier diffs.

I believe there are relative advantages/disadvantages of Eden vs. Piper+CitC and that both projects aspire to have the best of each in the limit.

“Yes”, but with custom server, custom virtual filesystem layer, and heavily-tweaked client — https://github.com/facebookexperimental/eden
It's quite a bit different from stock hg at this point. The server is custom, and decent chunks of the CLI have been rewritten in rust.

https://github.com/facebookexperimental/eden

Previous discussion https://news.ycombinator.com/item?id=23124095

Facebook has a Mercurial clone named EdenSCM[1], which includes a scalable backend named Mononoke[2].

[1] https://github.com/facebookexperimental/eden

[2] https://github.com/facebookexperimental/eden#mononoke

At facebook, a virtual filesystem (https://github.com/facebookexperimental/eden) + change monitor (https://facebook.github.io/watchman/) = source control operations run in O(files I have modified) instead of O(size of repository) time