From 47af40cf9e5045aecc6f82f5599f111fef392bac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jun 2023 14:58:23 +0000 Subject: [PATCH] chore(deps): bump hotwatch from 0.4.6 to 0.5.0 Bumps [hotwatch](https://github.com/francesca64/hotwatch) from 0.4.6 to 0.5.0. - [Release notes](https://github.com/francesca64/hotwatch/releases) - [Changelog](https://github.com/francesca64/hotwatch/blob/main/CHANGELOG.md) - [Commits](https://github.com/francesca64/hotwatch/compare/v0.4.6...v0.5.0) --- updated-dependencies: - dependency-name: hotwatch dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 209 +++++++++++---------------------- komorebi/Cargo.toml | 2 +- komorebi/src/static_config.rs | 6 +- komorebi/src/window_manager.rs | 13 +- 4 files changed, 80 insertions(+), 150 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 94ebda9f..260d5a1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -390,6 +390,15 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "file-id" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13be71e6ca82e91bc0cb862bebaac0b2d1924a5a1d970c822b2f98b63fda8c3" +dependencies = [ + "winapi-util", +] + [[package]] name = "filetime" version = "0.2.23" @@ -447,41 +456,15 @@ dependencies = [ "memchr", ] -[[package]] -name = "fsevent" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" -dependencies = [ - "bitflags 1.3.2", - "fsevent-sys", -] - [[package]] name = "fsevent-sys" -version = "2.0.1" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" dependencies = [ "libc", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags 1.3.2", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "futures-channel" version = "0.3.30" @@ -618,12 +601,13 @@ dependencies = [ [[package]] name = "hotwatch" -version = "0.4.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39301670a6f5798b75f36a1b149a379a50df5aa7c71be50f4b41ec6eab445cb8" +checksum = "9140219159163c92eb58c37955a0cc57c5814c3c44521955aae376064c668756" dependencies = [ "log", "notify", + "notify-debouncer-full", ] [[package]] @@ -725,9 +709,9 @@ dependencies = [ [[package]] name = "inotify" -version = "0.7.1" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" dependencies = [ "bitflags 1.3.2", "inotify-sys", @@ -743,15 +727,6 @@ dependencies = [ "libc", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -790,16 +765,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "komorebi" version = "0.1.22-dev.0" @@ -816,7 +781,7 @@ dependencies = [ "hotwatch", "komorebi-core", "lazy_static", - "miow 0.5.0", + "miow", "nanoid", "net2", "os_info", @@ -898,18 +863,32 @@ dependencies = [ name = "komorebic-no-console" version = "0.1.22-dev.0" +[[package]] +name = "kqueue" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", +] + [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.153" @@ -1020,25 +999,6 @@ dependencies = [ "adler", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow 0.2.2", - "net2", - "slab", - "winapi 0.2.8", -] - [[package]] name = "mio" version = "0.8.10" @@ -1046,34 +1006,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", + "log", "wasi", "windows-sys 0.48.0", ] -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio 0.6.23", - "slab", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - [[package]] name = "miow" version = "0.5.0" @@ -1118,7 +1055,7 @@ checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" dependencies = [ "cfg-if 0.1.10", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1134,20 +1071,34 @@ dependencies = [ [[package]] name = "notify" -version = "4.0.17" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", + "crossbeam-channel", "filetime", - "fsevent", "fsevent-sys", "inotify", + "kqueue", "libc", - "mio 0.6.23", - "mio-extras", + "log", + "mio", + "walkdir", + "windows-sys 0.48.0", +] + +[[package]] +name = "notify-debouncer-full" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4812c1eb49be776fb8df4961623bdc01ec9dfdc1abe8211ceb09150a2e64219" +dependencies = [ + "crossbeam-channel", + "file-id", + "notify", + "parking_lot", "walkdir", - "winapi 0.3.9", ] [[package]] @@ -1156,7 +1107,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1166,7 +1117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ "overload", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1258,7 +1209,7 @@ checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" dependencies = [ "log", "serde", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1910,7 +1861,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1961,7 +1912,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2029,7 +1980,7 @@ dependencies = [ "backtrace", "bytes", "libc", - "mio 0.8.10", + "mio", "num_cpus", "pin-project-lite", "socket2", @@ -2163,7 +2114,7 @@ checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ "memoffset", "tempfile", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2360,12 +2311,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -2376,12 +2321,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2394,7 +2333,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2670,7 +2609,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd4bec39938e0ae68b300e2a4197b6437f13d53d1c146c6e297e346a71d5dde9" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2692,13 +2631,3 @@ dependencies = [ "cfg-if 1.0.0", "windows-sys 0.48.0", ] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] diff --git a/komorebi/Cargo.toml b/komorebi/Cargo.toml index e0dcec62..da8389dd 100644 --- a/komorebi/Cargo.toml +++ b/komorebi/Cargo.toml @@ -22,7 +22,7 @@ ctrlc = "3" dirs = { workspace = true } getset = "0.1" hex_color = { version = "3", features = ["serde"] } -hotwatch = "0.4" +hotwatch = "0.5" lazy_static = "1" miow = "0.5" nanoid = "0.4" diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index 5f1ebf98..67b233eb 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -32,7 +32,7 @@ use crate::WORKSPACE_RULES; use color_eyre::Result; use crossbeam_channel::Receiver; -use hotwatch::notify::DebouncedEvent; +use hotwatch::EventKind; use hotwatch::Hotwatch; use komorebi_core::config_generation::ApplicationConfigurationGenerator; use komorebi_core::config_generation::ApplicationOptions; @@ -744,10 +744,10 @@ impl StaticConfig { let bytes = SocketMessage::ReloadStaticConfiguration(path.clone()).as_bytes()?; - wm.hotwatch.watch(path, move |event| match event { + wm.hotwatch.watch(path, move |event| match event.kind { // Editing in Notepad sends a NoticeWrite while editing in (Neo)Vim sends // a NoticeRemove, presumably because of the use of swap files? - DebouncedEvent::NoticeWrite(_) | DebouncedEvent::NoticeRemove(_) => { + EventKind::Modify(_) | EventKind::Remove(_) => { let socket = DATA_DIR.join("komorebi.sock"); let mut stream = UnixStream::connect(socket).expect("could not connect to komorebi.sock"); diff --git a/komorebi/src/window_manager.rs b/komorebi/src/window_manager.rs index 95343bc1..7ae94794 100644 --- a/komorebi/src/window_manager.rs +++ b/komorebi/src/window_manager.rs @@ -12,7 +12,8 @@ use color_eyre::eyre::anyhow; use color_eyre::eyre::bail; use color_eyre::Result; use crossbeam_channel::Receiver; -use hotwatch::notify::DebouncedEvent; +use hotwatch::notify::ErrorKind as NotifyErrorKind; +use hotwatch::EventKind; use hotwatch::Hotwatch; use parking_lot::Mutex; use schemars::JsonSchema; @@ -261,18 +262,18 @@ impl WindowManager { match self.hotwatch.unwatch(&config) { Ok(()) => {} Err(error) => match error { - hotwatch::Error::Notify(error) => match error { - hotwatch::notify::Error::WatchNotFound => {} - error => return Err(error.into()), + hotwatch::Error::Notify(ref notify_error) => match notify_error.kind { + NotifyErrorKind::WatchNotFound => {} + _ => return Err(error.into()), }, error @ hotwatch::Error::Io(_) => return Err(error.into()), }, } - self.hotwatch.watch(config, |event| match event { + self.hotwatch.watch(config, |event| match event.kind { // Editing in Notepad sends a NoticeWrite while editing in (Neo)Vim sends // a NoticeRemove, presumably because of the use of swap files? - DebouncedEvent::NoticeWrite(_) | DebouncedEvent::NoticeRemove(_) => { + EventKind::Modify(_) | EventKind::Remove(_) => { std::thread::spawn(|| { load_configuration().expect("could not load configuration"); });