BlogsMetaSource Control Systems

Source Control Systems

Source Control Systems

7
posts
2013–2022

Meta's source control systems have evolved with the development and open-sourcing of Sapling, a Git-compatible client designed for extreme scalability and user-friendliness. This evolution includes the adoption of Rust for critical components like the Mononoke rewrite of Mercurial, demonstrating Rust's reliability and performance benefits for large-scale systems. The company has also established dedicated teams to support Rust development, improve interoperability with C++, and contribute to the development of Mercurial extensions like Watchman integration for faster file status operations and remotefilelog for optimized clone and pull performance, addressing the challenges of managing massive repositories and large histories.

2022

Sapling: Source control that’s user-friendly and scalable

11/15/2022

This post introduces Sapling, a new Git-compatible source control client developed at Meta. It details the motivation for building a new system to handle large monorepos, highlighting its emphasis on usability and scalability. Key features discussed include the 'smartlog' for repository visualization, tools for easily fixing mistakes, and robust support for commit stacks. The post also introduces ReviewStack, a code review UI for GitHub pull requests that integrates with Sapling. Technical details on scaling history through a Segmented Changelog and lazy data downloading are also provided.

2021

A brief history of Rust at Facebook

4/29/2021

This post details the historical adoption and integration of Rust within Facebook's engineering infrastructure, starting with its use in the Mononoke project for source control to improve commit rates and reliability. It highlights the growth of Rust adoption for developer tooling and backend services, the establishment of a dedicated Rust developer experience team, and the ongoing commitment to supporting Rust internally and externally, including contributions to the Diem blockchain and the Rust Foundation. The post also discusses the technical challenges and strategies for Rust-C++ interoperability in a highly distributed and threaded server environment.

2017

Announcing Yarn 1.0

9/7/2017

This post announces the 1.0 release of the Yarn JavaScript package manager, highlighting key new features: Yarn Workspaces for monorepos, auto-merging of lockfiles to resolve merge conflicts, and selective version resolutions for managing transient dependencies. It also details various other fixes and improvements, emphasizing the significant community involvement in its development and outlining future directions for Yarn, including release automation and package security enhancements.

Dev Tools @Scale 2017 Recap

6/5/2017

This post recaps the Dev Tools @Scale 2017 conference, highlighting presentations on scaling development tools. Key contributions include details on Facebook's Project OneWorld for large-scale device testing, Infer for static code analysis, Jupiter for CI job scheduling, and the Git Virtual File System (GVFS) for scaling Git to massive repositories. Other presentations covered Amazon's developer tools, GitHub's repository hosting challenges, Spotify's Android testing, ARM's cross-platform debugging tools, and Google's Bazel build system.

2016

Automatically push commits to GitHub with FBShipIt

4/20/2016

This post introduces FBShipIt, an open-sourced tool developed internally to automate the process of pushing commits from Facebook's internal Mercurial repositories to external GitHub repositories. It addresses challenges such as moving files, removing confidential information, translating internal user names to GitHub user names, and managing incompatibilities between Git and Mercurial. The tool evolved from an earlier version ('fboss') and was expanded to handle multiple projects and incorporate building and testing before pushing. FBShipIt is written in Hack and works by cloning repositories, fetching updates, copying and filtering commits based on defined functions, and pushing changes, with support for project-specific phases like building and testing.

2014

Scaling Mercurial at Facebook

1/7/2014

This post details the technical challenges of scaling Mercurial at Facebook due to the massive size of its main source repository. It describes the decision to improve Mercurial over Git, the contribution of over 500 patches to Mercurial, and the development of two key extensions: hgwatchman for speeding up file status operations by integrating with Watchman (making status commands 5x faster than Git's), and remotefilelog for optimizing clone and pull operations by downloading only commit metadata and fetching file contents on demand via memcache (making clones and pulls 10x faster). It also highlights the use of memcache as a caching layer in front of the central Mercurial server to reduce network load by over 10x.

2013

Watchman: Faster builds with large source trees

5/30/2013

Introduced Watchman, a file change detection service designed to significantly speed up build times for large source trees. Watchman provides a fast and reliable service to query for changed or deleted files since the last query, enabling incremental build processes and reducing interactive-user build times by 60%. It runs on Linux, OS X, FreeBSD, and Solaris and was open-sourced.