Add support for non-recursive watches in FSEventsEmitter#779
Conversation
The underlying `fseventsd` service always observes recursively. As such we're adding a filter in `FSEventEmitter` to support the non-recursive behaviour that is supported by other emitters.
BoboTiG
left a comment
There was a problem hiding this comment.
Nice one!
Could you add the changelog entry 🙏 ?
|
Of course. Was just waiting for the review before adding the relevant changelog entry. :-) Won't get around to all of it before Monday, though. |
Test a few more scenarios for non-recursive watches. Do note that at least on macOS we'll get a `DirModifiedEvent` for the created subdirectory.
|
Turns out that the additional test cases fail on Ubuntu and Windows. What would be the expected behaviour on these platforms for the added scenarios? The same as on macOS? |
We're fixing a defect on macOS after all, and addressing the failures on other platforms looks like opening a can of worms that is not related to the original issue.
|
You are right with the last commit, let's tackle macOS only for now :) |
|
@BoboTiG - shall we get this merged? 😄 The failed test on macOS / 3.7 seems to be a timing issue in a flaky test |
|
Oh yes, sorry for the delay! Thanks for the patch :) |
|
Just making sure you're aware, this pull request caused issue #797. |
See gorakhargosh/watchdog#779 No-Docs-Update-Reason: bug fix Change-Id: I6a5fd6bc7964e2da672593d50180cb9aa7b6b8c1 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/48521 Reviewed-by: Max Koopman <koopman@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Michael Spang <spang@google.com>
The underlying
fseventsdservice always observes recursively. As such we're adding a filter inFSEventEmitterto support the non-recursive behaviour that is supported by other emitters.Fixes #771