Closed mr-salty closed 2 years ago
Thanks @mr-salty — this looks pretty good to me. I'm going to pull it down and run with it locally for a while to validate it before merging.
Just documenting this for posterity — it seems that the project switched to date-based version numbers in the move from v4.9.0 to v2020.05.11.0, so the major.to_i > 3
check is going to produce the desired result for both date-based and typical major.minor.patch
formats.
Fun fact: there is a list-capabilities
command that would be great for detecting relative_root
support, but it was only added in 3.8 🤣.
Thanks for this @mr-salty. Seems to work well enough, and I think the risk is pretty low because most people aren't actually using the Watchman scanner, so I merged this.
If watchman is bersion 3.3 or later, use
watch-project
rather than the deprecatedwatch
. The main advantage is eliminating redundant nested watches (i.e. where one is a subtree of another), which reduces RAM and CPU usage in thewatchman
daemon and eliminates the indexing delay when invoking Command-T after moving down the directory hierarchy.Although
watch-project
was introduced in 3.1 it is awkward/inefficient to use without therelative_root
query which was introduced in 3.3. 3.3 was released in June 2015, so most users should have a newer version but backward compatibility with older versions is maintained.Fixes #389
Tested:
watch
, which is unchanged from existing code.--version