facebook / buck2

Build system, successor to Buck
https://buck2.build/
Apache License 2.0
3.53k stars 215 forks source link

Watchman/buck2 integration #527

Open mhathawayansys opened 9 months ago

mhathawayansys commented 9 months ago

I have a project on Linux which has been converted to use buck2 as the build system. Watchman is recommended as a prerequisite for using buck2 (https://buck2.build/docs/legacy/basics/getting-started/#prerequisites-1).

Running both separately doesn't appear to be an issue, but buck2 is simply using the default, iNotify, for its file watching. I am unable to find any documentation for how to integrate watchman with buck2.

How can I achieve using watchman as the file watching service for buck2?

Issue raised in parallel for watchman: https://github.com/facebook/watchman/issues/1177

ndmitchell commented 9 months ago

Anything under docs/legacy isn't real docs. They seem to be confusing more than they are helpful. I'm going to hide them now, sorry for the confusion.

If your project is "small" (think 10K files rather than 10M) then the default inotify will be just fine. If you want to use watchman set the [buck2] file_watcher = watchman in your root .buckconfig.

mhathawayansys commented 9 months ago

The projects I am focused on will certainly be on the larger side. This is useful information though, thanks.

_If you want to use watchman set the [buck2] filewatcher = watchman in your root .buckconfig.

Is this documented somewhere?