Skip to content

Conversation

@nekowinston
Copy link

Closes #14.
I think I implemented the changes correctly, but I'm not 100% confident yet, thus marking it as WIP.
Just wanted to get the ball rolling on the issue.

@nekowinston
Copy link
Author

nekowinston commented Feb 4, 2025

I've been comparing the two outputs of the master branch and the PR branch with

export CLOCK=$(watchman clock . | jq -r .clock)
diff <(~/Code/rs-git-fsmonitor/target/release/rs-git-fsmonitor 2 "$CLOCK" | xxd) <(/nix/store/.../bin/rs-git-fsmonitor 2 "$CLOCK" | xxd)

and I'm pretty sure the output is correct.

Some notes:
If I understand resolve_root correctly, it uses the watch-project subcommand under the hood instead of the (deprecated) watch subcommand; which might lead to watchman watch-list differing to the current master branch.

Also, Connector::new will still spawn the underlying watchman CLI to figure out which watchman socket to use – I see a way better speedup compared to the master branch if I set WATCHMAN_SOCK as an environment variable.

@nekowinston nekowinston marked this pull request as ready for review February 4, 2025 15:15
nekowinston added a commit to nekowinston/dotfiles that referenced this pull request Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use watchman Rust client instead of subprocess

1 participant