Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update changelog, MSRV and dependencies #657

Merged
merged 5 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
version:
- 1.72.1 # MSRV
- 1.77.2 # MSRV
- stable
- nightly
os:
Expand All @@ -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
Expand Down
19 changes: 15 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,37 @@ 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"
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"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 2 additions & 0 deletions notify/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,15 @@ use std::path::Path;

pub(crate) type Receiver<T> = std::sync::mpsc::Receiver<T>;
pub(crate) type Sender<T> = std::sync::mpsc::Sender<T>;
#[cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))]
pub(crate) type BoundSender<T> = std::sync::mpsc::SyncSender<T>;

#[inline]
pub(crate) fn unbounded<T>() -> (Sender<T>, Receiver<T>) {
std::sync::mpsc::channel()
}

#[cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))]
#[inline]
pub(crate) fn bounded<T>(cap: usize) -> (BoundSender<T>, Receiver<T>) {
std::sync::mpsc::sync_channel(cap)
Expand Down
6 changes: 3 additions & 3 deletions notify/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
}
Expand Down Expand Up @@ -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."));
}

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.72.1"
channel = "1.77.2"