watchexec

Executes commands in response to file modifications

APACHE-2.0 License

Downloads
1.3K
Stars
5.2K
Committers
64

Bot releases are hidden (Show)

watchexec - Lib v2.0.0-pre.6

Published by passcod almost 3 years ago

  • Globset filterer was erroneously passing files with no extension when an extension filter was specified
watchexec - Lib v2.0.0-pre.5

Published by passcod almost 3 years ago

  • Update MSRV (to 1.58) and policy (bump incurs minor semver only)
  • Some bugfixes around canonicalisation of paths
  • Eliminate context-less IO errors
  • Move error types around
  • Prep library readme
  • Update deps
watchexec - Lib v2.0.0-pre.4

Published by passcod almost 3 years ago

  • More logging, especially around ignore file discovery and filtering
  • The const paths::PATH_SEPARATOR is now public, being : on Unix and ; and Windows.
  • Add Subversion to discovered ProjectTypes
  • Add common (sub)Filterer for ignore files, so they benefit from a single consistent implementation. This also makes ignore file discovery correct and efficient by being able to interpret ignore files which searching for ignore files, or in other words, not descending into directories which are ignored.
  • Integrate this new IgnoreFilterer into the GlobsetFilterer and TaggedFilterer. This does mean that some old v1 behaviour of patterns in gitignores will not behave quite the same now, but that was arguably always a bug. The old "buggy" v1 behaviour around folder filtering remains for manual filters, which are those most likely to be surprising if "fixed".
watchexec - Lib v2.0.0-pre.3

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.
watchexec - Lib v2.0.0-pre.2

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).
  • The 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).
  • The 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.
watchexec - Lib v2.0.0-pre.1

Published by passcod almost 3 years ago

  • MSRV bumped to 1.56
  • Rust 2021 edition
  • More documentation around tagged filterer:
    • == and != are case-insensitive
    • the mapping of matcher to tags
    • the mapping of matcher to auto op
  • Finished the tagged filterer:
    • Proper path glob matching
    • Signal matching
    • Process completion matching
    • Allowlisting pattern works
    • More matcher aliases to the parser
    • Negated filters
    • Some silly filter parsing bugs
    • File event kind matching
    • Folder filtering (main confusing behaviour in v1)
  • Lots of tests:
    • Globset filterer
    • Including the "buggy"/confusing behaviour of v1, for parity/compat
    • Tagged filterer:
      • Paths
      • Including verifying that the v1 confusing behaviour is fixed
      • Non-path filters
      • Filter parsing
    • Ignore files
    • Filter scopes
    • Outcomes
    • Change reporting in the environment
      • ...Specify behaviour a little more precisely through that process
  • Prepare the watchexec event type to be serializable
    • A synthetic FileType
    • A synthetic ProcessEnd (ExitStatus replacement)
  • Some ease-of-use improvements, mainly removing generics when overkill
watchexec - Lib v2.0.0-pre.0

Published by passcod about 3 years ago

watchexec - Lib v1.17.1

Published by passcod about 3 years ago

  • Process handling code replaced with the new command-group crate.
  • #158 New option use_process_group (default true) allows disabling use of process groups.
  • #168 Default debounce time further decreased to 100ms.
  • Binstall configuration and transitional cargo install watchexec stub removed.
watchexec - Lib v1.16.1

Published by passcod over 3 years ago

  • #200: Expose when the process is done running
  • ba26999028cfcac410120330800a9a9026ca7274 Pin globset to 0.4.6 to avoid breakage due to a bugfix in 0.4.7
watchexec - 1.14.1: tweaks

Published by passcod about 4 years ago

  • fdb0cfb Soft-deprecate (in documentation only) Args.debug as it's not used any more.
  • #163 Add a manifest on Windows to transparently opt-in to long path support when supported. This is a cli change only and is not present in downstream executables (see associated commits for how to do it for your application).
  • #165 Fix help text and documentation to mention that -w can be used to watch files as well as folders.
  • #168 Drop default debounce time to 300ms. This is an experiment to gain testing on a lower value! Please report any issues. If it goes well the default will be dropped again later on.
watchexec - 1.14.0: environmental story-telling

Published by passcod over 4 years ago

  • #157 Error and exit gracefully when the subprocess's environment would be too large (as a result of too many changes being added to the WATCHEXEC_* environment variables instead of throwing a cryptic message ("Argument list too long")
  • #157 Add --no-environment to disable the WATCHEXEC_* variables being set, to avoid the above situation completely.
  • #157 Add --no-meta to disable only "metadata" events from being reported as above, which mitigates the above situation.
  • #160 ⚠️ Stop initialising the logger in the library code. Downstream users will need to initialise their own logger if they want debug/warn output. As a reminder, the library API is not considered in semver here, and downstream users are encouraged to specify exact versions: watchexec = "=1.14.0".
watchexec - 1.13.1: bug in new gitignore code

Published by passcod over 4 years ago

  • passcod/cargo-watch#149: if watched directory didn't contain a .git folder, thread would block (infinite loop)
watchexec - 1.13.0: gitignores in subdirectories (first pass)

Published by passcod over 4 years ago

  • #147: .gitignore files are now looked at in children as well as parents, the latter being very much not what should happen, but I'm kinda stuck with it at the moment to avoid breaking behaviour, eeech
  • #150: clarity around time units in the interface
  • Deps: notify (patch), globset (patch), clap (patch), nix (major: 0.15 → 0.17)
watchexec - 1.12.0: when is the watcher not watching?

Published by passcod almost 5 years ago

  • #142: Change ignore globbing to behave as the readme documents: -i foo now matches the foo folder and descendants, instead of having to specify -i foo/**
  • #141, #123: Introduce a --watch-when-idle option that ignores events emitted while the command is running. This may help ignore changes made by the command itself (#40), though it of course also ignores all other changes during that time.
watchexec - 1.11.1: become owned again

Published by passcod almost 5 years ago

  • Revert a change that made a type borrowed instead of the more sane (and more flexible) owned
watchexec - 1.11.0: sharing in ignorance

Published by passcod almost 5 years ago

  • Support for .ignore files (#127)
  • zsh completions in tree and releases (#130)
  • Semver policy for library written down (#135)
  • A new builder for Args (#135)
  • More flexible Handler trait (#133)
  • Rust Edition 2018
  • MSRV bumped to 1.38
  • Builds done with --locked for reproducibility (#131)
  • Windows builds moved to Travis
  • MSVC release builds are back
  • Linux and macOS builds use xz compression
  • Lots of lints enabled
  • Some typos fixed (#128, #129)
watchexec - 1.10.3: a new man

Published by passcod about 5 years ago

  • The man page was brought up-to-date to new options and a hint to use -- (#125)
watchexec - 1.10.2: small but mighty ignore fix

Published by passcod over 5 years ago

  • Always canonicalise paths, fixing a bug where some ignores would sometimes fail to apply (#113)
  • Some dependency updates (#115, #116, 7ed5ea577793d44be574031ba8a408acba8b0699)
  • Crate is somewhat smaller (#117)
watchexec - 1.10.1

Published by passcod over 5 years ago

  • Fix crash on some error conditions. (#111)
  • Clear the screen on initial run again (4918b12)
watchexec - 1.10.0: Fixes, updates, some more API surface

Published by passcod over 5 years ago

New API features

The API now enables:

  • parsing a command line string into watchexec Args
  • writing one's own handler to react to changes
  • a lot more errors to be caught instead of panicking

This also has creates two minor breaking changes:

  • Args's paths field is now a Vec<PathBuf> rather than a Vec<String>
  • cli::get_args() returns a Result rather than nothing

This was done in #105, prompted by #104 and #103.

Clap update

This formalises the fix to #76.

Support commands that allocate their own TTY

Through setsid, thanks to @Mange (#102).

Fixes #47 and some other issues downstream.

An attempt to fix some issues clearing screens under some Windows configurations

These are hard to guess at / repro. Maybe it helped #99.

Dependency upgrades

  • Notify 4.0.7 brings in some fixes, notably a performance/battery-saving optimisation on Linux.
  • Regex 1.1.0 brings in some performance improvements for (git)ignore patterns

Some progress towards manual restarts

As part of the API changes, file-triggered runs and manual runs are now explicitly differentiated, which will help when eventually implementing #67.