facebook / facebook/watchman

watchman-make only monitors current and below paths

Open
#569 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Running watchman 4.9.0 on Mac OSX 10.13.3 the following occurs:

```bash
$ watchman-make -p x.txt ../y.txt -t trigger
# Relative to /Users/brianmhunt/.../sub-dir
# Changes to files matching x.txt ../y.txt will execute `make trigger`
# waiting for changes

...

$ touch x.txt
# Execute: `make trigger`

$ touch ../y.txt
(nothing)
```

This is unexpected behaviour and I could not find any documentation on any relative-path restrictions.

This failure occurs also with absolute-paths.

A workaround is to use `--root` but that convolutes the `Makefile`.

If `watchman-make` is not intended to handle paths outside the relative path, then it would be good to document this restriction and ideal to error/warn when one attempts to watch paths that are going to be ignored.

If `watchman-make` is intended to handle paths outside the relative path, then this seems to be a bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.