Commit Graph

31 Commits

Author SHA1 Message Date
Félix Saparelli bc0fe6be70
Add context to io errors 2022-01-16 19:46:52 +13:00
Félix Saparelli b29b3bf1e0
Add helper trait to add context to io errors 2022-01-16 19:09:50 +13:00
Félix Saparelli c821faf383
Split error mod and split generic/specific io errors 2022-01-16 18:57:40 +13:00
Félix Saparelli b8d9ad728e
Integrate IgnoreFilterer into GlobsetFilterer 2022-01-16 15:18:15 +13:00
Félix Saparelli ca4d4900a9
Add filterer and parser for ignore files 2022-01-12 00:54:21 +13:00
Félix Saparelli 31cbe69051
Configure miette docsurl globally per error type 2022-01-12 00:53:41 +13:00
Félix Saparelli 9527202c51
Add RuntimeError::Set of related errors 2022-01-12 00:52:39 +13:00
Félix Saparelli 70b1a3cd7b
Fix doc links 2021-10-17 03:06:08 +13:00
Félix Saparelli fae4fbf9a0
Docs: error 2021-10-17 02:32:43 +13:00
Félix Saparelli 17b83fda08
Docs: command 2021-10-17 02:24:36 +13:00
Félix Saparelli 55e4e1dc58 Review TODOs in the code 2021-10-15 23:00:50 +13:00
Félix Saparelli 65b042ec8f
Discover ignore files for path and for user/env 2021-10-10 16:03:05 +13:00
Félix Saparelli 323f2d29ee
Split off filter errors into their own type(s) 2021-10-09 18:41:45 +13:00
Félix Saparelli 3dff065f4b
Add error variants for external custom errors 2021-10-09 18:38:37 +13:00
Félix Saparelli f492bca8c3
Add filter add/del error to runtime 2021-09-28 22:23:23 +13:00
Félix Saparelli 84dc77f787 Add parser for filters 2021-09-14 20:11:29 +12:00
Félix Saparelli 8e4994abca
Add process supervisor to watch command to completion
Also change the concept of a completion handler to instead sending a
synthetic "process completed" event down the same path as usual.

That makes handling completion the job of the action handler, but also
means it's immediately possible to launch a process or do an action in
response to the process completing. Win win!
2021-09-03 05:22:15 +12:00
Félix Saparelli ef453193af
Add pre-spawn and post-spawn hooks 2021-08-25 04:41:14 +12:00
Félix Saparelli 33fb691d29
Add method to insert events into watchexec manually 2021-08-24 22:20:44 +12:00
Félix Saparelli 17b09d8798
Add graceful exit support 2021-08-23 02:32:08 +12:00
Félix Saparelli 3066ee5913
Implement most of process handling 2021-08-23 00:28:20 +12:00
Félix Saparelli 2a0661b122
Call action handler on action 2021-08-22 05:58:03 +12:00
Félix Saparelli 0f37e42243
Add action worker 2021-08-21 04:43:55 +12:00
Félix Saparelli dcde429787
Improve handlers to not need GATs and provide various impls 2021-08-21 04:43:15 +12:00
Félix Saparelli 5d11ccaa71
Add a bit more structure via documentation 2021-08-19 20:44:02 +12:00
Félix Saparelli 6f3abdeaea
Add RuntimeError::from_handler utility 2021-08-19 20:30:35 +12:00
Félix Saparelli 0bb38f40a5
Start off on main interface 2021-08-19 01:12:50 +12:00
Félix Saparelli 0237a568df
Handle signals into events 2021-08-17 21:41:13 +12:00
Félix Saparelli 822148da03
Canonicalise paths + add example 2021-08-17 01:15:17 +12:00
Félix Saparelli b15615bbaa
Start on watchexec v2 2021-08-16 21:49:12 +12:00
Félix Saparelli 1f3f4ada35 Split into two crates: lib and cli
That has a number of advantages:

- #193 the build.rs is only run for the CLI, so the Windows manifest is
  not embedded in the library anymore, opening it up for downstreams.

- it sets the stage for decoupling the version numbers of the CLI and
  library, to have the library increase its major more often, while the
  CLI retains compatibility further… that is, to have both follow semver

- it removes the CLI-only dependencies from the library

- it makes compilation a bit faster as compiling the library and the
  CLI's other dependencies can happen in parallel

One major disadvantage:

- installing via cargo changes from watchexec to watchexec-cli. Most
  installs are from prebuilt and from packages, but that's still a
  potential stumble.

And of course, the CLI APIs in the library are gone (they were already
deprecated, though).

We also take this opportunity to get rid of the clear_screen code and
use our new clearscreen library. #99 #171 #185
2021-05-01 03:27:17 +12:00