cargo-watch

Watches over your Cargo project's source.

CC0-1.0 License

Downloads
899K
Stars
2.7K
Committers
36

Bot releases are hidden (Show)

cargo-watch - 7.0.4: because I broke watchexec, and thus 7.0.3

Published by passcod about 6 years ago

cargo-watch -

Published by passcod about 6 years ago

cargo-watch -

Published by passcod about 6 years ago

  • Updated watchexec
  • Set up CI for automated builds to releases
cargo-watch -

Published by passcod about 6 years ago

#96 — On Windows, fix build — patch

cargo-watch -

Published by passcod about 6 years ago

#89 — On Windows, better support for ignores — breaking

cargo-watch -

Published by passcod about 7 years ago

  • Breaking: change default value of --delay to 0.5 seconds
  • Dependency: update to watchexec 1.8.5
  • Watchexec: apply --delay value to debounce time as well as poll interval
cargo-watch - 5.1.0

Published by passcod about 7 years ago

  • Feature: --no-restart flag (#73)
  • Docs: new article for inotify limits (#72)
cargo-watch - 5.0.5

Published by passcod over 7 years ago

  • Fix: parse --delay from seconds instead of mistakenly interpreting the argument as milliseconds (#72)
  • Doc: add "No space left on device" error to troubleshooting section (#72)
cargo-watch - 5.0.4

Published by passcod over 7 years ago

  • Improvement: change the current directory to the cargo root at the top level, not at the subcommand level. That should improve #71 while still supporting #70.
cargo-watch - 5.0.3

Published by passcod over 7 years ago

Bugfix: support directories/paths with spaces (#70)

cargo-watch - 5.0.2

Published by passcod over 7 years ago

cargo-watch - 5.0.1: more version control ignores

Published by passcod over 7 years ago

Following from watchexec 1.8.3, corrected the .git ignore glob and added ones for .hg and .svn.

cargo-watch - Version 5.0.0: A New Hope; aka Just Wrap Watchexec, Properly This Time

Published by passcod over 7 years ago

This is the proper way to implement Version "5".

In a major break from the past, Cargo Watch now depends directly on Watchexec. It uses the newly-landed (contributed by yours truly) library support in watchexec to directly and statically embed it, parsing our own options and figuring out our own defaults and then running watchexec's main loop with the relevant arguments.

This means that we take advantage of Watchexec's excellent features and fixes in this domain, and can focus entirely on the cargo experience and the specific concerns around it. Notably, this fixes:

  • #25
  • #63
  • #64
  • #62

You can install as usual with

$ cargo install cargo-watch

And upgrade an existing install with:

$ cargo install --force cargo-watch

If you had previously installed the watchexec binary to make the wrappy version work, and you do not require it anymore, you can safely uninstall it. However, watchexec itself is a great tool and may suit other non-cargo usecases you have well, so consider keeping it.

cargo-watch - Version "5" aka Just Wrap Watchexec

Published by passcod over 7 years ago

I've written a new version that calls watchexec by translating cargo watch's options and defaults, so given that watchexec has several issues of ours covered, technically these are fixed:

  • #25
  • #63
  • #64
  • and maybe #62

It's a bit of a cheat, though.

You can install with this lengthy command:

$ cargo install --git https://github.com/passcod/cargo-watch --branch just-wrap-watchexec

And if you don't have it already, you'll also need to $ cargo install watchexec.

This is not published to crates.io because I haven't completely given up on making my non-wrappy version work, so if I publish further non-wrappy releases they'll go on crates.io on the 4.x release boat.

cargo-watch - v4.0.3

Published by passcod over 7 years ago

Bugfix:

  • Also ignore .git folder by default
cargo-watch - v4.0.2

Published by passcod over 7 years ago

Bugfixes

  • Wait on a process after killing it, as per Duct documentation.
  • Fix an issue with the way echo was called that caused it not to work on Windows cmd. (#59)
cargo-watch - v4.0.1

Published by passcod over 7 years ago

Bugfix:

  • A command exiting with a non-0 status was hanging the Duct job, which in turn caused a check on the next iteration to abort Cargo Watch. Jobs no longer hang when commands fail, and this check no longer causes an abort. (#57)
cargo-watch - v4.0.0

Published by passcod over 7 years ago

Breaking changes:

  • The command is now run immediately, instead of waiting for changes first (#37)
  • New CLI usage. The simple invocation hasn't changed, but everything else has.
  • You now have to use -x <cmd> to run custom cargo commands (multiple times as needed).

New features:

  • Watch everything: the entire project is watched, but the target/ folder is ignored by default. (#31, #35, #39)
  • You can decide to instead watch specific folders with -w <folder> (multiple times as needed).
  • Gitignore support: .gitignore files are found and parsed recursively through the repo. This can be disabled with --no-gitignore.
  • Custom ignore rules can be specified with -i <pattern> (multiple times as needed).
  • If you absolutely need to, you can explicitly require that no ignoring is applied: --ignore-nothing.
  • You can suppress all of cargo-watch's output with -q, leaving only the output from the commands.
  • You can run arbitrary commands with -s <cmd> (for --shell) (multiple times as needed).
  • You can customise the debouncing delay with --delay or -d, in seconds.

Features from 3.2.0 (which was just a few days ago so might be shadowed by this release):

  • You can force cargo-watch to use polling instead of the native API with --poll.
  • It will automatically fallback to polling if the native API fails to start.
  • You can clear the screen between runs with --clear or -c.

Server development (#25) is still not quite supported, but is expected to make it in soon in a point release.

Package Rankings
Top 8.55% on Alpine-edge
Top 4.6% on Alpine-v3.18
Top 11.23% on Alpine-v3.17
Top 9.78% on Alpine-v3.15
Top 10.41% on Alpine-v3.16
Top 3.8% on Crates.io
Badges
Extracted from project README
Crate release version Crate license: CC0 1.0 Crate download count CI status