Skip to content

Go client for Facebook's Watchman file watching service

License

Notifications You must be signed in to change notification settings

sjansen/watchman

Repository files navigation

Go Watchman Client

GoDoc Latest Release Project Status: Active – The project has reached a stable, usable state and is being actively developed. License FOSSA Status Sourcegraph

Build Status codecov Codacy Badge Go Report Card Maintainability Dependabot Status

This Go module provides a client for Facebook's Watchman, a file watching service with support for recording and querying filesystem state. Two alternative APIs are provided. The high-level API is designed for common use cases. The low-level API is designed to enable advanced use cases.

Frequently Asked Questions

Why use Watchman instead of fsnotify/inotify/kevent/etc?

  • Watchman conserves system resources by enabling applications to share watches instead of duplicating them.
  • Watchman waits for changes to settle down before sending notifications.
  • Watchman can also be queried for changes since a previous check, or queried for current filesystem state.
  • Watchman has been battle hardened by use in projects such as Buck, Mercurial, and React Native.

Are all Watchman features supported?

All primitives necessary to access the full Watchman protocol are implemented, however this project is still a work in progress. Most Watchman commands still need to be mapped to more friendly data structures and methods. In addition, the eventual replacement of JSON ecoding with more efficient BSER encoding is planned but not yet implemented.

For details, see docs/status.md.

Roadmap

This is a personal project. I work on it when I feel like it. The following is a list of things I might work on. It is not a list of commitments.

Contributions are welcome.

0.3

  • improved test coverage
  • start testing on Windows
  • expose existing command options

0.4

  • support additional commands

Contributing

pre-commit install

Additional Resources

https://facebook.github.io/watchman/docs/install.html

https://www.facebook.com/notes/facebook-engineering/watchman-faster-builds-with-large-source-trees/10151457195103920/