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

Add to crates.io to make installing easier?

Open chandlerc opened this issue 4 years ago • 12 comments

I understand that crates.io won't be able to install watchman automatically, but it'd still be nice.

Habitat isn't really an option for me. But I use Homebrew on Linux and i can install watchman easily there by hand, and then installed with:

cargo install --git https://github.com/jgavris/rs-git-fsmonitor.git

And it is working perfectly. =] Really like the tool and want to advertise it a bit, but wanted to get the installation steps to be as easy as possible.

(An alternative is to add Linuxbrew support -- currently it "successfully" installs athe macOS binary on Linux...)

chandlerc avatar Jan 03 '21 02:01 chandlerc

You can install it with nix on linux. The package in nix is named gitAndTools.rs-git-fsmonitor and maintained by me.

SuperSandro2000 avatar Jan 10 '21 13:01 SuperSandro2000

My goal was to reuse existing installers where possible. Having cargo available for Rust installations is really pervasive and it seems nice to enable people to leverage that rather than needing to add yet another package management layer for their system.

chandlerc avatar Jan 13 '21 09:01 chandlerc

I don't have rust installed and it just dumps a whole lot of stuff into my home directory. Also I need to remember to update things and you can't use brew to manage packages on multiple machines or uninstall things.

SuperSandro2000 avatar Jan 13 '21 09:01 SuperSandro2000

Sure, I understand that it isn't good for everyone. But for some, it would be helpful. Not sure why adding it to crates.io would mean not providing the nice Homebrew integration where possible. 🤷

chandlerc avatar Jan 17 '21 00:01 chandlerc

I'm happy to merge any documentation for installation you folks provide. The more the merrier.

@chandlerc would you mind adding instructions for cargo? Is there any benefit to publishing a crate versus installing directly from a git repo (semantically similar to the brew tap I started with)?

@SuperSandro2000 would you mind putting up a PR for instructions for installing with nix?

jgavris avatar Jan 18 '21 16:01 jgavris

would you mind putting up a PR for instructions for installing with nix?

The problem is that people need to write it into their configuration files to permanently use it and there is no way one liner to do that. I could add a comment to quickly test it though.

nix-shell -p gitAndTools.rs-fs-minitor

IIRC

SuperSandro2000 avatar Jan 18 '21 17:01 SuperSandro2000

I'm happy to merge any documentation for installation you folks provide. The more the merrier.

@chandlerc would you mind adding instructions for cargo?

cargo install --git https://github.com/jgavris/rs-git-fsmonitor.git

Is there any benefit to publishing a crate versus installing directly from a git repo (semantically similar to the brew tap I started with)?

Management of release versions? Updating to new versions when released? Follows the standards for installing (even binary) Rust tools... ripgrep, bat, fd-find, skim, etc....

chandlerc avatar Jan 28 '21 07:01 chandlerc

Related: https://twitter.com/chandlerc1024/status/1354689408646090753

chandlerc avatar Jan 28 '21 07:01 chandlerc

@chandlerc very good points about managing release versions. I suppose I hadn't prioritized that because there has been only 1 meaningful release since the initial one (the v2 hook) of the monitor protocol. But I will definitely clean up the release / distribution process soon, especially if a v3 hook comes out. I'd love to join the infamy of ripgrep and friends, I'm 💯 team Rust.

jgavris avatar Feb 09 '21 15:02 jgavris

I will be pushing an Apple Silicon (fat binary) build soon, with a couple more small optimizations.

jgavris avatar Mar 25 '22 20:03 jgavris

Also trying work through using the BSER protocol for watchman which might get a couple more milliseconds.

jgavris avatar Mar 25 '22 20:03 jgavris

For macOS and Windows users, happy to note that a 'fast' fsmonitor is now built in to Git 2.37. See the post here from some awesome contributions from Microsoft. https://github.blog/2022-06-27-highlights-from-git-2-37/#a-builtin-filesystem-monitor-for-windows-and-macos

Linux users may have to wait a little longer for native support, or can keep using this one. But the built-in fsmonitor in git 2.37 is even faster than this version by a few milliseconds. Possibly using BSER over JSON might get us closer, I'd have to read more into why the C implementation is a fair bit faster than this Rust + Watchman version.

jgavris avatar Jul 17 '22 12:07 jgavris