Commit Graph

357 Commits

Author SHA1 Message Date
Félix Saparelli ed72c4998e
Add access to events for {Pre,Post}Spawn
Also make access to events read-only (via Arc) for Action
2021-12-29 20:40:12 +13:00
Félix Saparelli d64135c2c0
Upgrade tracing-subscriber to 0.3 2021-12-24 02:35:26 +13:00
Félix Saparelli c3094eaff8
Upgrade to tokio-console 0.1 2021-12-24 02:28:21 +13:00
Félix Saparelli 0f51a6e794
Test filter files 2021-12-24 02:21:45 +13:00
Félix Saparelli 26254f7022
Add support for "tagged filter files" 2021-12-24 02:20:56 +13:00
Félix Saparelli 8f9492a7bc
Fix filtering when there's both a Glob and a NotGlob match 2021-12-24 02:19:58 +13:00
Félix Saparelli f19dbf945d
Express process end exceptions as hex in filters 2021-12-23 00:32:56 +13:00
Félix Saparelli 9d04143202 lib: v2.0.0-pre.1 2021-12-21 18:19:16 +13:00
Félix Saparelli d14e7ff41b
Implement process completion signal matching 2021-12-21 18:05:52 +13:00
Félix Saparelli 8a7699cf2f
Add process completion signal tests 2021-12-21 18:01:51 +13:00
Félix Saparelli e4d669e230
Implement most of process completion matching
(except ExitSignal)
2021-12-21 17:56:14 +13:00
Félix Saparelli e7de00edfe
Change process completion auto op to glob 2021-12-21 17:49:24 +13:00
Félix Saparelli 5856f976db
Add tests for process completion 2021-12-21 17:49:02 +13:00
Félix Saparelli 4323a28852
Implement signal matching 2021-12-21 16:38:57 +13:00
Félix Saparelli ff8b019245
Add tests for signal matchers 2021-12-21 16:29:36 +13:00
Félix Saparelli 8a25ea95af
Add sig alias for signal parsed tag 2021-12-21 16:19:35 +13:00
Félix Saparelli 962c7cd6d6
Test pids 2021-12-21 16:14:58 +13:00
Félix Saparelli 02534defd6
Test feks 2021-12-18 12:53:33 +13:00
Félix Saparelli 946c52b513
Document op and matcher mappings 2021-12-18 12:44:59 +13:00
Félix Saparelli 159a8a4b2e
Change auto op for FEKs to glob 2021-12-18 12:44:40 +13:00
Félix Saparelli ba9d9939d9
Add more aliases for matcher 2021-12-18 12:44:18 +13:00
Félix Saparelli 5ebceddc3e
Start testing nonpaths 2021-12-17 23:29:02 +13:00
Félix Saparelli d38a78631f
Test negation in tagged parser 2021-12-17 23:19:36 +13:00
Félix Saparelli debded9c0e
Add stability note to tagged filterer 2021-12-17 23:19:16 +13:00
Félix Saparelli d6b5dd5ae0
Test parser 2021-12-17 03:57:25 +13:00
Félix Saparelli b59acaa9cf
Start testing parser and nonpaths 2021-12-15 07:24:13 +13:00
Félix Saparelli e4cd1d7379
Test ignorefiles on globset, bugs and all 2021-12-15 06:39:54 +13:00
Félix Saparelli 1af3a1c849
Extract common test helpers 2021-12-15 06:33:55 +13:00
Félix Saparelli 23925db51e
Test scopes 2021-12-15 06:01:40 +13:00
Félix Saparelli 015447e433
Fix whitelisting in pathed globs 2021-12-15 04:57:17 +13:00
Félix Saparelli a4c863baf8
Test ignore files with folders and globs 2021-12-14 01:47:34 +13:00
Félix Saparelli f8250f47de
Suppress supervisor.handle warning 2021-12-10 00:53:18 +13:00
Félix Saparelli 289f76ae6c
Test outcome resolving 2021-12-08 22:07:58 +13:00
Félix Saparelli f229456f88
Specify and test sorting behaviour 2021-12-08 21:43:10 +13:00
Félix Saparelli 89fd99a683
Add multipaths tests 2021-12-08 21:25:03 +13:00
Félix Saparelli e9275702d1
Fix common_path stemming and start testing summarise_events_to_env 2021-12-07 01:14:19 +13:00
Félix Saparelli a3751519e8
Re-export notify event types 2021-12-07 00:50:33 +13:00
Félix Saparelli 41869af688
Simplify summarise_events_to_env signature (and usage) 2021-12-07 00:49:14 +13:00
Félix Saparelli 0826d531af
Test scoped path glob filtering 2021-12-02 21:33:48 +13:00
Félix Saparelli ce3f2a3cbd
Fix tests/document remaining differences from globset 2021-12-01 01:45:19 +13:00
Félix Saparelli 2d633d9177
Use proper ignore API so path globs match correctly
This notably fixes the v1 "confusing" behaviour when matching folders,
where the expectation is for any of:

folder
folder/
/folder

to match the folder and all paths below it, but v1 would only do this
when *both* of these were added:

**/folder
**/folder/**

Which is very verbose and has caught literally everyone who's ever tried
to do this kinda thing.

The old behaviour is preserved in the globset filterer, for
compatibility, as there are other small behavioural changes that this
affects, even though the new behaviour in the tagged filterer is
arguably the most correct and the old is a bug.
2021-12-01 01:41:07 +13:00
Félix Saparelli 1ff3cbf455
Add lots more logging to add_filter path 2021-11-30 02:11:50 +13:00
Félix Saparelli f3bc5fa6d3
Test globset properly
All paths are canonicalised at entrance, so testing should reflect that
2021-11-30 01:42:00 +13:00
Félix Saparelli 4367380a7c
Ignore failing tests 2021-11-28 02:28:14 +13:00
Félix Saparelli 269894e1b0
Add tests for tagged (paths only)
- v1 buggy tests don't pass
2021-11-28 02:22:07 +13:00
Félix Saparelli 0efdf8ea16
Pull globset tests from v1 2021-11-22 22:22:39 +13:00
Félix Saparelli a12a83cea2
Fix mistaken assumption in ProcessEnd::from(unix) 2021-10-28 01:03:54 +13:00
Félix Saparelli 745e3baa71
Span tracing in globset filterer check 2021-10-28 01:03:24 +13:00
Félix Saparelli 631b492064
Span tracing in tagged filterer check 2021-10-28 01:01:35 +13:00
Félix Saparelli b13c23c576 Use latest stable toolchain in audit 2021-10-26 21:13:57 +13:00
Félix Saparelli 6d23339dea
Yes but why rely on bits 2021-10-22 06:04:11 +13:00
Félix Saparelli 5c012c5b0c
Fix nonzeros not being bit-opable (windows) 2021-10-22 05:55:28 +13:00
Félix Saparelli 470cdd698b
Replace ExitStatus with our own type in Event 2021-10-22 05:38:48 +13:00
Félix Saparelli 6671863f2f
Replace std FileType with our own (serde-able) enum 2021-10-20 01:18:43 +13:00
Félix Saparelli 401437784d
Opt in to 2021 ed 2021-10-20 01:00:21 +13:00
Félix Saparelli be37349b90
Bump msrv to 1.56.0 (2021 ed) 2021-10-20 00:48:47 +13:00
Félix Saparelli c758675728
Prep for folder tests 2021-10-20 00:47:22 +13:00
Félix Saparelli 110e1d4c96
Start a test harness for globset 2021-10-17 17:11:50 +13:00
Félix Saparelli 34d7c5ee9c
Make globset easier to create (less generics) 2021-10-17 17:11:29 +13:00
Félix Saparelli f9cbb11258
Just reset the MSRV to latest stable (1.55), might as well 2021-10-17 04:12:04 +13:00
Félix Saparelli 9d14ad7166
Document that == and != are case-insensitive 2021-10-17 04:03:18 +13:00
Félix Saparelli beb87bdbb0
Update MSRV to 1.45
we can do it, it's a breaking...
also, Tokio requirement
2021-10-17 03:58:22 +13:00
Félix Saparelli 489fb612c7
Tagged docs typo 2021-10-17 03:54:48 +13:00
Félix Saparelli 1eb10074ef
Markdown typo 2021-10-17 03:53:05 +13:00
Félix Saparelli 43353fecb2
Fix for windows (unmarked unix-only import) 2021-10-17 03:48:32 +13:00
Félix Saparelli 0b60f5edb5 lib: v2.0.0-pre.0 2021-10-17 03:41:13 +13:00
Félix Saparelli 5d57621512
Write readme for 2.0.0-pre.0 2021-10-17 03:37:12 +13:00
Félix Saparelli 70b1a3cd7b
Fix doc links 2021-10-17 03:06:08 +13:00
Félix Saparelli 60fa09182d
Docs: watchexec 2021-10-17 03:01:55 +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 fcf6a2154a
Add notes to refer to more precise docs on the RuntimeConfig 2021-10-17 01:22:55 +13:00
Félix Saparelli 88dfc0d664
Add note about logging and error handling to main lib doc 2021-10-17 01:16:41 +13:00
Félix Saparelli 1522aaf409
Docs: action 2021-10-17 01:12:04 +13:00
Félix Saparelli d43165494f
Docs: event 2021-10-16 23:47:00 +13:00
Félix Saparelli 47fc2f30a8
Docs: SubSignal 2021-10-16 23:31:00 +13:00
Félix Saparelli 0ad0845018
Docs: filter 2021-10-16 23:14:57 +13:00
Félix Saparelli 8b8b9674aa
Docs: fs 2021-10-16 20:02:17 +13:00
Félix Saparelli 423caaef2a
Docs: ProjectType 2021-10-16 19:56:38 +13:00
Félix Saparelli e62f313533
Eliminate eyre from doctests too 2021-10-16 19:08:35 +13:00
Félix Saparelli 2225b6d097
Reduce deps featureset 2021-10-16 17:27:21 +13:00
Félix Saparelli 17310ee4b5
Docs: modules 2021-10-16 17:13:32 +13:00
Félix Saparelli e06f615531
Implement basic check_glob() 2021-10-16 17:09:21 +13:00
Félix Saparelli f58e97a62f
Fix globset ignorefile support (wrong field) 2021-10-16 17:01:27 +13:00
Félix Saparelli 5d2f2fcf62
Support the COMMON_PATH variant of the event summariser 2021-10-16 16:54:48 +13:00
Félix Saparelli 30abed3fb2
Add function to import an ignore file in globset filterer format 2021-10-16 16:45:03 +13:00
Félix Saparelli ebabef9eed
Support extensions in globset filterer 2021-10-16 16:37:29 +13:00
Félix Saparelli 19b27959ed
Add globset filterer 2021-10-16 16:26:29 +13:00
Félix Saparelli b2f4d0f244 Port method to summarise events from old source 2021-10-16 15:18:42 +13:00
Félix Saparelli 083c1e2f52 Move common_prefix to its own mod 2021-10-16 13:55:20 +13:00
Félix Saparelli e577b040b9
Handle signalling to sub process on non-unix 2021-10-16 01:21:52 +13:00
Félix Saparelli 92513a4dc3
Add SubSignal type for sending signals to subprocesses 2021-10-16 01:14:17 +13:00
Félix Saparelli 86882e8d27
Add From<&str> for WatchedPath 2021-10-16 01:13:39 +13:00
Félix Saparelli 75243bfdad
Rename Signal to MainSignal
in preparation for another signal type
2021-10-16 01:13:16 +13:00
Félix Saparelli 55e4e1dc58 Review TODOs in the code 2021-10-15 23:00:50 +13:00
Félix Saparelli 948388b019 Reduce featureset of dependencies (tokio,git2) 2021-10-15 14:27:17 +13:00
Félix Saparelli 8f61ac31da
Prep fs pathset for future 2021-10-15 01:38:21 +13:00
Félix Saparelli 14b0364135
Get filetype filters actually working 2021-10-14 01:26:15 +13:00
Félix Saparelli ae6af17aea
Find and load all ignores for watchexec cli 2021-10-14 00:38:56 +13:00
Félix Saparelli 87b6729ab7
Add utility ProjectType::{is_vcs,is_soft} and project::common_prefix fns 2021-10-14 00:14:31 +13:00
Félix Saparelli f24e95504b
Fix panic in tagged filtering 2021-10-14 00:13:48 +13:00
Félix Saparelli c6336cdf3c
Add filetype matcher 2021-10-13 04:06:55 +13:00
Félix Saparelli fb4f136c0d
Match path globs 2021-10-13 04:06:39 +13:00
Félix Saparelli 758ac2dc89
Change panic into a todo 2021-10-13 01:51:09 +13:00
Félix Saparelli fd2edbf11c
Compile gitignore patterns 2021-10-13 01:49:38 +13:00
Félix Saparelli c9da2c133a
Harmonise root/origin 2021-10-13 01:49:11 +13:00
Félix Saparelli f16ba2dff1
Redo and sketch new filter adding process 2021-10-13 00:48:42 +13:00
Félix Saparelli cd7d5f1fcb
Draft and plan ignore loading 2021-10-11 23:34:14 +13:00
Félix Saparelli 3c65aee839
Find project types 2021-10-10 23:35:27 +13:00
Félix Saparelli 1dff1f5644
Find project origins more efficiently 2021-10-10 23:35:11 +13:00
Félix Saparelli 59fe74656a
Stop using eyre even in examples 2021-10-10 21:04:40 +13:00
Félix Saparelli 7af0339871 Detect project origins (if any) 2021-10-10 17:56:49 +13:00
Félix Saparelli 3219be53f5
Add support for bazaar global ignores 2021-10-10 16:06:56 +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 8bc58ba6b5
Start sketching gitignore support 2021-10-09 18:45:32 +13:00
Félix Saparelli a1fce1b06e
Replace eyre with miette
and upgrade it to 3.2.0
2021-10-09 18:43:51 +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 81bee9513d
Remove derive-builder
* the InitConfigBuilder non-miette error goes away
* creating an InitConfig is no longer faillible for no reason
* the "builder" style is consistent between the two config structs
2021-10-09 18:37:59 +13:00
Félix Saparelli 07878f8357
Implement path filtering 2021-09-30 04:03:46 +13:00
Félix Saparelli 288ce9d2f4
== and != perform case-insensitive comparisons 2021-09-30 02:34:27 +13:00
Félix Saparelli d6b7175bb1 Formattting 2021-09-29 23:43:39 +13:00
Félix Saparelli 45a7ce6aa0
Fix logic error and upgrade warn to panic in debug 2021-09-28 23:44:28 +13:00
Félix Saparelli 6b306a15ab
Add event saturation notes 2021-09-28 22:52:59 +13:00
Félix Saparelli 7cdb6ac5ad
Bypass filters for empty events 2021-09-28 22:23:48 +13:00
Félix Saparelli f492bca8c3
Add filter add/del error to runtime 2021-09-28 22:23:23 +13:00
Félix Saparelli 9bb6e1356a
Add is_empty and is_internal to Event 2021-09-28 22:22:33 +13:00
Félix Saparelli f673d00e9c
Add logging to filter parser 2021-09-28 22:22:14 +13:00
Félix Saparelli f3c74bd151
Add methods to configure tagger filter 2021-09-28 22:21:51 +13:00
Félix Saparelli 4fda3c477b
Add logging to tagged filter 2021-09-28 22:21:13 +13:00
Félix Saparelli 6e414d1de4
Change the default of Shell 2021-09-28 01:44:20 +13:00
Félix Saparelli 2c894266a8
Add negation filters, and filter application 2021-09-28 00:54:33 +13:00
Félix Saparelli b57fa8b236 Start implementing two Filterers (v1 and v2) 2021-09-23 21:59:35 +12:00
Félix Saparelli 7875b4db67
Provide filterer as trait
which will allow basically anything user-provided as filter, though of
course we'll have (soon) our own fairly comprehensive implementation
2021-09-22 23:39:41 +12:00
Félix Saparelli f1685821a3
Split types out of action 2021-09-18 17:20:05 +12:00
Félix Saparelli 29d0b66ba9
Move filter types out 2021-09-18 17:09:00 +12:00
Félix Saparelli 2be21b6bac
Move filter parser out 2021-09-18 17:07:32 +12:00
Félix Saparelli 84dc77f787 Add parser for filters 2021-09-14 20:11:29 +12:00
Félix Saparelli 6a55f5cc6d
Start on filter types 2021-09-13 19:51:07 +12:00
Félix Saparelli 9e3c8c1f32
Rename particle/culars to tags 2021-09-13 19:34:40 +12:00
Félix Saparelli e5fcc6553e
Also leave alt buffer on reset 2021-09-04 02:00:57 +12:00
Félix Saparelli 4043ed34ae
Add Reset outcome (#186, #211) 2021-09-04 01:55:25 +12:00
Félix Saparelli 645ab74c62
Implement Outcome::Wait, and CLI on-busy=queue 2021-09-03 09:25:23 +12:00
Félix Saparelli b923638cbd
Correctly watch for process completion 2021-09-03 09:25:06 +12:00
Félix Saparelli 9c8d4c1a1b
Add fs event metadata to event 2021-09-03 08:14:04 +12:00
Félix Saparelli 5cbbb7b67f
Add Display impl for events 2021-09-03 07:57:59 +12:00
Félix Saparelli 608aa516b1
Add source to internal event 2021-09-03 07:57:45 +12:00
Félix Saparelli ec6b508894
Ignoring supervisor kill/signal internal errors
As the errors only occur when the process is dead anyway
2021-09-03 05:43:26 +12:00
Félix Saparelli b728bfecfc
Differentiate trace logs when ending supervisor 2021-09-03 05:42:24 +12:00
Félix Saparelli f880b0b38a
Always apply Both outcomes, even when the first fails 2021-09-03 05:41:50 +12:00