rs-git-fsmonitor icon indicating copy to clipboard operation
rs-git-fsmonitor copied to clipboard

Use watchman Rust client instead of subprocess

Open fanzeyi opened this issue 5 years ago • 5 comments

There is a newly added watchman Rust client implementation in the watchman repository at: https://github.com/facebook/watchman/tree/master/rust/watchman_client (on crates.io)

It's probably better to use that client instead of using Command::new. :D

fanzeyi avatar Jan 04 '20 00:01 fanzeyi

Thanks for the recommendation! I took a look at this and I will work on converting to use the client, though that means more refactoring to go async.

jgavris avatar Apr 08 '20 01:04 jgavris

FWIW I added an implementation using the watchman Rust crate at https://github.com/facebook/watchman/blob/master/rust/watchman_client/examples/since.rs

It might be useful.

fanzeyi avatar Apr 08 '20 02:04 fanzeyi

Awesome, very helpful reference. Also @wwwjfy is adding support for fsmonitor hook v2 and clock spec in https://github.com/jgavris/rs-git-fsmonitor/pull/20.

jgavris avatar Apr 08 '20 02:04 jgavris

Also saw this, is there still work to be done here?

daxmc99 avatar Sep 26 '20 05:09 daxmc99

I would welcome contributions for this if anyone wants to do the work. Personally the tool works well for my purposes right now and I'm not highly motivated to refactor it. Perhaps when I find a weekend where I want to dive into more modern async Rust I'll use this as my first project.

jgavris avatar Sep 30 '20 16:09 jgavris