Multiple root support for watchman
commitc75815fc96fb4d2486c8a479585b7187942110b5
authorGabe Levi <gabe@fb.com>
Thu, 14 Jun 2018 21:37:41 +0000 (14 14:37 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 14 Jun 2018 21:42:32 +0000 (14 14:42 -0700)
tree446859e202ca5b2c0da825174fb53581d9ac4bbd
parent54ea2c0ab4d7838c55bd716820adf6ece3f55b2f
Multiple root support for watchman

Summary:
Hack servers only watch a single directory (the root directory). Flow servers need to watch multiple directories. This attempts to adapt the current watchman support.

The basic idea is that each watched directory needs its own

* subscription
* relative_path (from the watch root)
* clockspec

We tell watchman to watch each watched directory and subscribe to that directory. And when we run queries, we send a query for each watched directory and merge the results.

Reviewed By: avikchaudhuri

Differential Revision: D8209048

fbshipit-source-id: 4ac81f040497938ab12c22f2817eff6610d1c09a
hphp/hack/src/server/hhMonitorInformant.ml
hphp/hack/src/server/serverEnvBuild.ml
hphp/hack/src/watchman/watchman.ml
hphp/hack/src/watchman/watchman_sig.ml
hphp/hack/src/watchman_event_watcher/watchmanEventWatcher.ml