Mar 15, 2021
ELI5: Watchman - Watching for Changes to Build Faster
By Dmitry Vinnik
Originally posted here.
In this post, we talk about a project called Watchman, a file watching service. If you would like to watch a video about Watchman, go to the Facebook Open Source YouTube channel.
Watchman is a file watching service, with clients for a command line, NodeJS and more. It records any changes and triggers assigned actions. In the example with the Facebook app, Watchman would have made sure that only files that are changed or affected by our developers get updated. We previously shared how this service reduced build time by 60% in some cases!
Beyond the build system, Watchman has been updated to support other use cases. It can log changes, trigger test suites, transform files and more. Watchman was also updated to support a wide range of operating systems, including Windows.
Where is it used?
Watchman was first open sourced by Facebook in 2013. Ever since then, Watchman has been used daily by our developers at Facebook. It was also integrated with many other open source projects like React Native and Buck.
Where can I learn more?
To learn more about Watchman, visit their website. The project has an excellent starter and advanced documentation. The project has an active community chat on the Freenode and StackOverflow. If you were to encounter an issue, there is also a troubleshooting page available on the project's site.
If you have any thoughts or questions about Watchman, let us know on our YouTube channel, or tweet at us.
About the ELI5 series
In a series of short videos (~1 min in length), one of our Developer Advocates on the Facebook Open Source team explains a Facebook open source project in a way that is easy to understand and use.
We will write an accompanying blog post (like the one you're reading right now) for each of these videos, which you can find on our YouTube channel.
To learn more about Facebook Open Source, visit our open source site, subscribe to our YouTube channel, or follow us on Twitter and Facebook.