diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 05f0e490..290857f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: version: - - 1.72.1 # MSRV + - 1.77.2 # MSRV - stable - nightly os: @@ -38,19 +38,19 @@ jobs: rustup override set ${{ matrix.version }} - name: check build serde,macos_kqueue for examples - if: matrix.version != '1.72.1' && matrix.os == 'macos-latest' + if: matrix.version != '1.77.2' && matrix.os == 'macos-latest' run: cargo check -p notify --features=serde,macos_kqueue --examples - name: check build serde,macos_kqueue - if: matrix.version == '1.72.1' && matrix.os == 'macos-latest' + if: matrix.version == '1.77.2' && matrix.os == 'macos-latest' run: cargo check -p notify --features=serde,macos_kqueue - name: check build serde for examples - if: matrix.version != '1.72.1' && matrix.os != 'macos-latest' + if: matrix.version != '1.77.2' && matrix.os != 'macos-latest' run: cargo check -p notify --features=serde --examples - name: check build serde - if: matrix.version == '1.72.1' && matrix.os != 'macos-latest' + if: matrix.version == '1.77.2' && matrix.os != 'macos-latest' run: cargo check --features=serde - name: check build without crossbeam/default features diff --git a/CHANGELOG.md b/CHANGELOG.md index fb69ee38..a962d9de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,21 @@ v5 maintenance branch is on `v5_maintenance` after `5.2.0` v4 commits split out to branch `v4_maintenance` starting with `4.0.16` +## notify 8.0.0 (unreleased) + +- CHANGE: raise MSRV to 1.77 [#569] [#610] **breaking** +- FEATURE: add config option to disable following symbolic links [#635] +- FIX: unaligned access to FILE_NOTIFY_INFORMATION [#647] **breaking** + +[#635]: https://github.com/notify-rs/notify/pull/635 +[#647]: https://github.com/notify-rs/notify/pull/647 + +## notify-types 2.0.0 (unreleased) + +- CHANGE: replace instant crate with web-time [#652] **breaking** + +[#652]: https://github.com/notify-rs/notify/pull/652 + ## file-id 0.2.2 (2024-10-25) - CHANGE: get file stats without read permission [#625] @@ -60,10 +75,6 @@ New crate containing public type definitions for the notify and debouncer crates [#568]: https://github.com/notify-rs/notify/pull/568 [#570]: https://github.com/notify-rs/notify/pull/570 -## notify-types 2.0.0 (unreleased) - -- CHANGE: replace instant crate with web-time **breaking** - ## debouncer-mini 0.5.0 (2024-10-25) - CHANGE: update notify to version 7.0.0 diff --git a/Cargo.toml b/Cargo.toml index 05cf5804..de0ec897 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,13 @@ exclude = [ ] [workspace.package] -rust-version = "1.72" +rust-version = "1.77" homepage = "https://github.com/notify-rs/notify" repository = "https://github.com/notify-rs/notify.git" edition = "2021" [workspace.dependencies] -bitflags = "2.3.0" +bitflags = "2.6.0" crossbeam-channel = "0.5.0" deser-hjson = "2.2.4" env_logger = "0.11.2" @@ -27,23 +27,23 @@ file-id = { version = "0.2.2", path = "file-id" } filetime = "0.2.22" fsevent-sys = "4.0.0" futures = "0.3.30" -inotify = { version = "0.10.2", default-features = false } +inotify = { version = "0.11.0", default-features = false } insta = "1.34.0" kqueue = "1.0.8" libc = "0.2.4" log = "0.4.17" mio = { version = "1.0", features = ["os-ext"] } web-time = "1.1.0" -nix = "0.27.0" +nix = "0.29.0" notify = { version = "7.0.0", path = "notify" } notify-debouncer-full = { version = "0.4.0", path = "notify-debouncer-full" } notify-debouncer-mini = { version = "0.5.0", path = "notify-debouncer-mini" } notify-types = { version = "1.0.0", path = "notify-types" } pretty_assertions = "1.3.0" rand = "0.8.5" -rstest = "0.21.0" +rstest = "0.23.0" serde = { version = "1.0.89", features = ["derive"] } serde_json = "1.0.39" tempfile = "3.10.0" walkdir = "2.4.0" -windows-sys = "0.52.0" +windows-sys = "0.59.0" diff --git a/README.md b/README.md index 893de634..38e7c812 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ _Cross-platform filesystem notification library for Rust._ - [Examples][examples] - [Changelog][changelog] - [Upgrading notify from v4](UPGRADING_V4_TO_V5.md) -- Minimum supported Rust version: **1.72** +- Minimum supported Rust version: **1.77** As used by: [alacritty], [cargo watch], [cobalt], [deno], [docket], [mdBook], [rust-analyzer], [watchexec], [watchfiles], [xi-editor], diff --git a/notify/src/lib.rs b/notify/src/lib.rs index f9a3b85c..25f5fd0b 100644 --- a/notify/src/lib.rs +++ b/notify/src/lib.rs @@ -170,6 +170,7 @@ use std::path::Path; pub(crate) type Receiver = std::sync::mpsc::Receiver; pub(crate) type Sender = std::sync::mpsc::Sender; +#[cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))] pub(crate) type BoundSender = std::sync::mpsc::SyncSender; #[inline] @@ -177,6 +178,7 @@ pub(crate) fn unbounded() -> (Sender, Receiver) { std::sync::mpsc::channel() } +#[cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))] #[inline] pub(crate) fn bounded(cap: usize) -> (BoundSender, Receiver) { std::sync::mpsc::sync_channel(cap) diff --git a/notify/src/windows.rs b/notify/src/windows.rs index b8500f84..f6425cdc 100644 --- a/notify/src/windows.rs +++ b/notify/src/windows.rs @@ -183,7 +183,7 @@ impl ReadDirectoryChangesServer { ptr::null_mut(), OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, - 0, + ptr::null_mut(), ); if handle == INVALID_HANDLE_VALUE { @@ -206,7 +206,7 @@ impl ReadDirectoryChangesServer { }; // every watcher gets its own semaphore to signal completion let semaphore = unsafe { CreateSemaphoreW(ptr::null_mut(), 0, 1, ptr::null_mut()) }; - if semaphore == 0 || semaphore == INVALID_HANDLE_VALUE { + if semaphore == ptr::null_mut() || semaphore == INVALID_HANDLE_VALUE { unsafe { CloseHandle(handle); } @@ -431,7 +431,7 @@ impl ReadDirectoryChangesWatcher { let (cmd_tx, cmd_rx) = unbounded(); let wakeup_sem = unsafe { CreateSemaphoreW(ptr::null_mut(), 0, 1, ptr::null_mut()) }; - if wakeup_sem == 0 || wakeup_sem == INVALID_HANDLE_VALUE { + if wakeup_sem == ptr::null_mut() || wakeup_sem == INVALID_HANDLE_VALUE { return Err(Error::generic("Failed to create wakeup semaphore.")); } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7eb23c42..6f14058b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.72.1" +channel = "1.77.2"