Executes commands in response to file modifications
APACHE-2.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] over 2 years ago
Bad release, see 1.18.4. Yanked from crates.io on 2022-01-26.
--shell
should default to sh
on unix, not none
(#240)Published by passcod over 2 years ago
Yanked for critical bug in globset (fixed in pre.8) on 2022-01-26
filter::check_glob
and error::GlobParseError
Published by github-actions[bot] over 2 years ago
--signal
causing a crash on Windows (#239)Published by github-actions[bot] over 2 years ago
-e
can now accept extensions with a leading period again. (#236)Published by passcod almost 3 years ago
This is the first release built on top of Watchexec library 2.0. Any change in behaviour other than listed below is a bug.
-v
, -vv
… up to -vvvv
printing increasingly more logs. Note that -v
already prints a lot more logs than in previous releases, and that the log format has changed. Additionally, the RUST_LOG
environment variable can be set for even finer-grained logging.--changes-only
was renamed to --print-events
, and its output changed. The former option persists as an alias for compatibility but will be removed eventually.--no-ignore
was renamed to --no-project-ignore
for clarity. The former option persists as an alias for compatibility but will be removed eventually.[[Command exited with 63]]
) (#37)--notify
/ -N
option now works properly, and is therefore out of experimental.~/.gitignore
, ~/.bazaar/ignore
) (#58)core.excludesFile
).git/info/exclude
)~/.config/watchexec/ignore
or as system-appropriateWATCHEXEC_IGNORE_FILES
environment variable (format is as for the system PATH
variable)WATCHEXEC_COMMON_PATH
is always set, with the common prefix of all pathsWATCHEXEC_OTHERWISE_CHANGED_PATH
is new, for event kinds not covered by the other five (CREATED
, META_CHANGED
, REMOVED
, RENAMED
, WRITTEN
)Note that this release is not coincidental with the stable release of the library 2.0, which is still "in preview."
When installing from the DEB packages, a prior version may need to be uninstalled first, see #233.
Set WATCHEXEC_FILTERER=tagged
to opt into a new filter engine. This will disable the -e
/ --exts
and -i
/ --ignore
options and change the -f
/ --filter
option to accept a "tagged filter" instead.
Documentation is available at: https://docs.rs/watchexec/2.0.0-pre.6/watchexec/filter/tagged/struct.TaggedFilterer.html
For example, this set of filters:
path=data/*.json
path*!test-*
kind=Create(*)
would only allow file creation events from JSON files in data/
except those starting with test-
.
There are 8 "tags" that can be matched upon, including path
, kind
(of the event: creates, modifies, metadata, etc), type
(of the path that was changed: file, folder, link, etc). There is a variety of operators: glob (*=
and *!
), exact (==
and !=
), sets (:=
and :!
), and regex (~=
and ~!
). The shorthand =
operator resolves to the "most useful" operator for the tag being matched (currently *=
for path
, kind
, and exit
, :=
otherwise). This provides a lot more power and flexibility, but does make filtering less intuitive — ideas are welcome on improvements.
The tagged filterer also solves the current filterer's main confusing issue: folder filtering. path=folder/
and path!*folder/
will do the expected thing, instead of requiring obscure forms like **/folder/**
.
Using the --filter-file
/ -F
option, one or more "tagged filter files" can be loaded, with every filter on a new line. Blank lines and lines starting with #
are ignored. Like for ignore files, the WATCHEXEC_FILTER_FILES
envvar is also consulted, and the ~/.config/watchexec/filter
global filter file applies if present (or in system-relevant location). There is no default project-local filter file.
This mode is experimental: it is not to be considered stable in any way. Using it will print a warning message when watchexec starts. The aim is to have it become good enough so it can be the default in a future breaking release (but not 2.0, which will instead focus on other long-standing issues which aren't as earth-shattering as this), or to use its ideas to improve the existing implementation, whichever ends up better for everyone!
This release comes with special thanks to Radon Rosborough, supporting me via Ko-fi.
Published by passcod almost 3 years ago
Published by passcod almost 3 years ago
Published by passcod almost 3 years ago
paths::PATH_SEPARATOR
is now public, being :
on Unix and ;
and Windows.Published by passcod almost 3 years ago
summarise_events_to_env
used to return COMMON_PATH
, it now returns COMMON
, in keeping with the other variable names.Published by passcod almost 3 years ago
summarise_events_to_env
returns a HashMap<&str, OsString>
rather than HashMap<&OsStr, OsString>
, because the expectation is that the variable names are processed, e.g. in the CLI: WATCHEXEC_{}_PATH
. OsStr
makes that painful for no reason (the strings are static anyway).Action
struct's events
field changes to be an Arc<Vec<Event>>
rather than a Vec<Event>
: the intent is for the events to be immutable/read-only (and it also made it easier/cheaper to implement the next change below).PreSpawn
and PostSpawn
structs got a new events: Arc<Vec<Event>>
field so these handlers get read-only access to the events that triggered the command.Published by passcod almost 3 years ago
==
and !=
are case-insensitiveFileType
ProcessEnd
(ExitStatus
replacement)Published by passcod about 3 years ago
Published by github-actions[bot] about 3 years ago
Experimental: --notify
/-N
flag sends a desktop notification when a change is observed (which may or may not trigger a command restart). While objectively the better behaviour would be to notify on command finish and vary the notification on exit status, we just can't do that at the moment with the current architecture.
RPM builds are temporarily disabled due some shifts in the ecosystem not being all caught up yet.
Published by github-actions[bot] about 3 years ago
#168 The default debounce time was further decreased to 100ms.
#145 New: @path
-style argument parsing. (like rustc) You can now specify @argfile
as the first argument to watchexec
: this will read the file argfile
and insert each line as an argument (no need to quote for whitespace, blank lines make empty arguments). This is a rudimentary way to have a configuration file, or as shorthand for established workflows; a more thorough file-based configuration system may be introduced later (#33, #136).
New: there’s now a website. Some of it is still being drafted, notably dedicated general documentation for this tool, but there’s already some specific documentation that’s been brought over and rewritten/improved, such as the inotify limitations and the glob patterns pages. Eventually a lot of the documentation that’s in readmes and issues will be moved there and improved.
#158 New: --no-process-group
flag to disable process groups.
New: RPM packages are now available. These are built from the same binaries in the tarballs and DEB packages, so may not work properly for distros due to glibc versions or whatever. Untested as I don’t run RPM-based distros, tell me how it goes.
New: checksums (BLAKE3 and SHA512) and signatures (minisign) for first-party pre-built packages. See on the website.
New: fatal errors (panics) will now be displayed via eyre; for a bit of a friendlier look and easier to debug. Hopefully these aren't seen much though!
Packagers: if you’re reading these notes:
Published by passcod about 3 years ago
use_process_group
(default true
) allows disabling use of process groups.cargo install watchexec
stub removed.Published by github-actions[bot] over 3 years ago
--watch-when-idle
or --on-busy-update=do-nothing
, watchexec did not appear to respond to new events after the initial run of the command. This release fixes that.Published by passcod over 3 years ago
Published by github-actions[bot] over 3 years ago
--clear
with clearscreen 1.0.4 (ref watchexec/clearscreen#1)This is a new CLI release only so that the binaries work, if you're using the library running cargo upgrade
is sufficient.
Published by github-actions[bot] over 3 years ago
clearscreen
library. This should in particular help with the -c
flag on Windows, and provide a more consistent experience (as much as is possible) everywhere.cargo install watchexec-cli
when installing via cargo.cargo binstall watchexec-cli
when installing via cargo-binstall, though cargo binstall watchexec
will still work for now but will rapidly stop working well as the versions diverge.main.rs
is in place which will direct you to install watchexec-cli
when using cargo install watchexec
. This stub will go away in a future release.watchexec
crate is now the library only and is versioned separately from the binary, which means semver now applies.Published by github-actions[bot] over 3 years ago