watcher icon indicating copy to clipboard operation
watcher copied to clipboard

readme backend uses unclear

Open wighawag opened this issue 1 year ago • 1 comments

Hi, in the doc there is both these sentences :

@parcel/watcher has the following watcher backends, listed in priority order:

FSEvents on macOS Watchman if installed inotify on Linux ReadDirectoryChangesW on Windows

and

@parcel/watcher has the following watcher backends, listed in priority order:

FSEvents on macOS Watchman if installed fts (brute force) on Linux FindFirstFile (brute force) on Windows

The are listed in 2 different sections, one for watching, one for querying but the wording make me wonder if I should worry about this if I intent to use the watcher to watch file like I do with chokidar

Not really interested in the watchman option as I do not expect all the user of my tool to want to install it so my worry is on Linux.

Basically should I use chokidar or @parcel/watcher ?

wighawag avatar Mar 23 '23 07:03 wighawag

For watching (so to listen for file changes while your tool is running), macOS, Linux and Windows all have some native backend that works fine. Even without watchman.

But for querying (so to answer "which files changed since you last ran you tool"), there's only a native backend on macOS and all other platforms use bruteforce or Watchman if available.

So you should be fine as far as I understand you

mischnic avatar Mar 23 '23 11:03 mischnic