Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FileWatcher doesn't seem to work on macOS any more #358

@jonathanj

Description

@jonathanj

Doing git bisect I ended up on 0fff20d as being the cause of it no longer working.

In my case, the RecommendedWatcher::kind() is Fsevent, and for reasons I don't understand, doing watcher.watch inside of the thread, doesn't seem to actually watch anything. I put a breakpoint inside of the recommended_watcher event handler to confirm this. I tried upgrading notify to 8.0.0, and poked around the Github project but couldn't find any clues (it's possible I did a bad job of looking.) The documentation for notify doesn't mention using thread::spawn, maybe this is obvious to a seasoned Rust programmer, but I was expecting to find some advice in the docs.

I'm not sure what the issue was that lead to the previously mentioned commit, perhaps it was PollWatcher causing a hang? Maybe on another OS? Maybe in a specific repo setup?

What I haven't tried yet is manually creating PollWatcher or KQueue on macOS to see if they still work when used from a thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions