Skip to content

SYSTEM Cited by 1 source

Watchman

Watchman is Meta's open-source file system monitor service (facebook.github.io/watchman). It exposes an incremental "what files changed since timestamp T" API by subscribing to OS-level file-system notifications (inotify on Linux, FSEvents on macOS, ReadDirectoryChangesW on Windows) and maintaining an in-memory index.

Why it matters to the wiki

Watchman is load-bearing for any tool that needs to answer "what changed in this working copy" without re-scanning the whole directory tree — a query that becomes impossible at monorepo scale.

Named canonical use in this wiki: Sapling's sl status. Per the 2022-11-15 Sapling announcement post:

"Even without the virtual file system, we speed up sl status by utilizing Meta's Watchman file system monitor to query which files have changed without scanning the entire working copy."

— Sapling announcement post

The same trick powers Facebook's internal Mercurial/Sapling hg status and related commands; externally, Buck2, Facebook's React Native tooling, and various IDEs/build systems also consume Watchman for incremental file-change subscriptions.

Stub page

First wiki page for Watchman. Future sources that touch incremental file-system observation at scale (Bazel daemon, EdenFS, large-repo IDE indexers) should extend this page.

Seen in

Last updated · 319 distilled / 1,201 read