What does HackerNews think of sapling?

A Scalable, User-Friendly Source Control System.

Language: Rust

Hey fellow Xeta.

The number of secondary repos was/is declining by merging them into poly-monorepos. For example, opsfiles was/is moving to fbcode.

With good D/VCS tools that can checkout code efficiently, review processes, and CICD testing, there's no real reason to avoid monorepos.

Btw, the FB "hg" was semi-opensourced as sapling. Eden and mononoke still haven't been FOSSed. And, like many Meta dev tool FOSS projects, they don't just build and work OOTB and often have hard-coded Meta-isms like references to internal paths. https://github.com/facebook/sapling

> I haven't seen a virtual filesystem overlaid on top of a monorepo before, do you have any examples of what that looks like?

https://github.com/facebook/sapling

Most (all?) of these are open source and can be used outside of Meta infra. https://github.com/facebook/sapling
I was reading on & on, going, yeah sounds great, but when are you going to mention that it runs on Mercurial, which just puts such massive distance between FB & the rest of the planet?

They do mention that it supports virtual file systems through Sapling, which now encompasses their long known EdenFS. I'd like to know more but right off the bat Sapling says it is:

> Sapling SCM is a cross-platform, highly scalable, Git-compatible source control system.

Git compatible eh? Thats a lot less foreboding. (It is however a total abstraction over git with it's own distinct cli tools.)

I hope there are some good up to date resources on Sapling/EdenFS. I have heard some really interesting things about code kind of auto getting shipped up to the mothership & built/linted proactively, it just at commit points, which always sounded neat, and there seem to be some neat transparent thin checkout capabilities here.

https://github.com/facebook/sapling

https://github.com/facebook/sapling is doing good work and they are suggesting their git server for large repositories exists.
Yeah, it's interesting to think about persisting the state we would need to make the file system more sympatico with Hermit. If we were willing to have a daemon.... Meta develops this "watchman" tool that our build infrastructure uses. I think for existing file systems we could imagine a daemon that watches the directory and caches what we need.

But if we could dream of new file systems, then I want one that is basically btrfs but with O(1) file-level parallel-hashes (rather than block level). Heck maybe it could even enforce a sorted order on directories for us too. The hashes would be very useful in record-and-replay scenarios, where you could know immediately whether the input files are in your content-addressible blob storage without having to hash them every time.

(We have some hash support in Meta's EdenFS FUSE file system https://github.com/facebook/sapling)

P.S. about Reproducible Builds -- we pitched this to the community in 2019 (at the Reproducible Builds Summit) and with that ASPLOS'20 paper, but we would be eager to see anyone wanting to pick it up and take it further.

Not sure if anyone has tried this yet... but the example tutorial does not work.

    $ sl clone https://github.com/facebook/sapling
    $ cd sapling
    $ sl
    @  fafe18a24  23 minutes ago  ricglz  remote/main
    │  migrate packer to new CLI framework
    ~
From [0] under "Cloning your first repo". I get the following:

    ~/sapling (main)> sl status
    abort: '/full/path/sapling' is not inside a repository, but this command requires a repository!
    (use 'cd' to go to a directory inside a repository and try again)
Hopefully this does not assume we are authenticating with GH just to clone and see sl operating?

[0] https://sapling-scm.com/docs/introduction/getting-started/