Skip to content

Commit

Permalink
Pull Request #569: MSRV 1.72
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpr03 committed Jun 30, 2024
2 parents ade84e8 + 1b2be02 commit 9bfa286
Show file tree
Hide file tree
Showing 16 changed files with 148 additions and 221 deletions.
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.63.0 # MSRV
- 1.72.1 # 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.63.0' && matrix.os == 'macos-latest'
if: matrix.version != '1.72.1' && matrix.os == 'macos-latest'
run: cargo check -p notify --features=serde,macos_kqueue --examples

- name: check build serde,macos_kqueue
if: matrix.version == '1.63.0' && matrix.os == 'macos-latest'
if: matrix.version == '1.72.1' && matrix.os == 'macos-latest'
run: cargo check -p notify --features=serde,macos_kqueue

- name: check build serde for examples
if: matrix.version != '1.63.0' && matrix.os != 'macos-latest'
if: matrix.version != '1.72.1' && matrix.os != 'macos-latest'
run: cargo check -p notify --features=serde --examples

- name: check build serde
if: matrix.version == '1.63.0' && matrix.os != 'macos-latest'
if: matrix.version == '1.72.1' && matrix.os != 'macos-latest'
run: cargo check --features=serde

- name: check build without crossbeam/default features
Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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 7.0.0

- CHANGE: raise MSRV to 1.72
- CHANGE: remove internal use of crossbeam-channels

## notify-types 1.0.0

New crate containing public type definitions for the notify and debouncer crates.
Expand All @@ -13,7 +18,7 @@ New crate containing public type definitions for the notify and debouncer crates

## debouncer-full 0.4.0

- CHANGE: Manage root folder paths for the file ID cache automatically. **breaking**
- CHANGE: manage root folder paths for the file ID cache automatically **breaking**

```rust
debouncer.watcher().watch(path, RecursiveMode::Recursive)?;
Expand All @@ -26,8 +31,8 @@ New crate containing public type definitions for the notify and debouncer crates
debouncer.watch(path, RecursiveMode::Recursive)?;
```

- CHANGE: Add `RecommendedCache`, which automatically enables the file ID cache on Windows and MacOS
and disables it on Linux, where it is not needed.
- CHANGE: add `RecommendedCache`, which automatically enables the file ID cache on Windows and MacOS
and disables it on Linux, where it is not needed

## debouncer-full 0.3.1 (2023-08-21)

Expand Down
45 changes: 41 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,45 @@ members = [
"notify-debouncer-mini",
"notify-debouncer-full",
"file-id",
# internal
"examples"
#"examples/hot_reload_tide" until https://github.com/rustsec/rustsec/issues/501 is resolved
"examples",
]
exclude = ["examples/hot_reload_tide"]
exclude = [
"examples/hot_reload_tide", # excluded until https://github.com/rustsec/rustsec/issues/501 is resolved
]

[workspace.package]
rust-version = "1.72"
homepage = "https://github.com/notify-rs/notify"
repository = "https://github.com/notify-rs/notify.git"
edition = "2021"

[workspace.dependencies]
bitflags = "2.3.0"
crossbeam-channel = "0.5.0"
deser-hjson = "2.2.4"
env_logger = "0.11.2"
file-id = { path = "file-id" }
filetime = "0.2.22"
fsevent-sys = "4.0.0"
futures = "0.3.30"
inotify = { version = "0.10.2", default-features = false }
insta = "1.34.0"
kqueue = "1.0.8"
libc = "0.2.4"
log = "0.4.17"
mio = { version = "0.8.10", features = ["os-ext"] }
mock_instant = "0.3.0"
instant = "0.1.12"
nix = "0.27.0"
notify = { path = "notify" }
notify-debouncer-full = { path = "notify-debouncer-full" }
notify-debouncer-mini = { path = "notify-debouncer-mini" }
notify-types = { path = "notify-types" }
pretty_assertions = "1.3.0"
rand = "0.8.5"
rstest = "0.18.2"
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"
14 changes: 7 additions & 7 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ publish = false
edition = "2021"

[dev-dependencies]
notify = { version = "6.1.1", path = "../notify" }
notify-debouncer-mini = { version = "0.4.1", path = "../notify-debouncer-mini" }
notify-debouncer-full = { version = "0.4.0", path = "../notify-debouncer-full" }
futures = "0.3"
tempfile = "3.5.0"
log = "0.4.17"
env_logger = "0.10.0"
notify = { workspace = true }
notify-debouncer-mini = { workspace = true }
notify-debouncer-full = { workspace = true }
futures = { workspace = true }
tempfile = { workspace = true }
log = { workspace = true }
env_logger = { workspace = true }

[[example]]
name = "async_monitor"
Expand Down
15 changes: 7 additions & 8 deletions file-id/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
[package]
name = "file-id"
version = "0.2.1"
rust-version = "1.60"
description = "Utility for reading inode numbers (Linux, MacOS) and file IDs (Windows)"
documentation = "https://docs.rs/notify"
homepage = "https://github.com/notify-rs/notify"
repository = "https://github.com/notify-rs/notify.git"
readme = "../README.md"
license = "MIT OR Apache-2.0"
keywords = ["filesystem", "inode", "file", "index"]
categories = ["filesystem"]
authors = ["Daniel Faust <[email protected]>"]

edition = "2021"
rust-version = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }

[[bin]]
name = "file-id"
path = "bin/file_id.rs"

[dependencies]
serde = { version = "1.0.89", features = ["derive"], optional = true }
serde = { workspace = true, optional = true }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.48.0", features = ["Win32_Storage_FileSystem", "Win32_Foundation"] }
windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] }

[dev-dependencies]
tempfile = "3.2.0"
tempfile = { workspace = true }
48 changes: 20 additions & 28 deletions notify-debouncer-full/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,46 +1,38 @@
[package]
name = "notify-debouncer-full"
version = "0.4.0"
edition = "2021"
rust-version = "1.63"
description = "notify event debouncer optimized for ease of use"
documentation = "https://docs.rs/notify-debouncer-full"
homepage = "https://github.com/notify-rs/notify"
repository = "https://github.com/notify-rs/notify.git"
authors = ["Daniel Faust <[email protected]>"]
keywords = ["events", "filesystem", "notify", "watch"]
license = "MIT OR Apache-2.0"
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
name = "notify_debouncer_full"
path = "src/lib.rs"
rust-version = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }

[features]
default = ["crossbeam","macos_fsevent"]
default = ["macos_fsevent"]
serde = ["notify-types/serde"]
mock_instant = ["dep:mock_instant","notify-types/mock_instant"]
# can't use dep:crossbeam-channel and feature name crossbeam-channel below rust 1.60
crossbeam = ["crossbeam-channel","notify/crossbeam-channel"]
serialization-compat-6 = ["notify/serialization-compat-6"]
mock_instant = ["dep:mock_instant", "notify-types/mock_instant"]
crossbeam-channel = ["dep:crossbeam-channel", "notify/crossbeam-channel"]
macos_fsevent = ["notify/macos_fsevent"]
macos_kqueue = ["notify/macos_kqueue"]

[dependencies]
notify = { version = "6.1.1", path = "../notify", default-features = false }
notify-types = { version = "1.0.0", path = "../notify-types" }
crossbeam-channel = { version = "0.5", optional = true }
file-id = { version = "0.2.1", path = "../file-id" }
walkdir = "2.2.2"
log = "0.4.17"
mock_instant = { version = "0.3.0", optional = true }
notify = { workspace = true }
notify-types = { workspace = true }
crossbeam-channel = { workspace = true, optional = true }
file-id = { workspace = true }
walkdir = { workspace = true }
log = { workspace = true }
mock_instant = { workspace = true, optional = true }

[dev-dependencies]
notify-debouncer-full = { path = ".", features = ["mock_instant"] }
pretty_assertions = "1.3.0"
rstest = "0.18"
serde = { version = "1.0.89", features = ["derive"] }
deser-hjson = "1.1.1"
rand = "0.8.5"
notify-debouncer-full = { workspace = true, features = ["mock_instant"] }
pretty_assertions = { workspace = true }
rstest = { workspace = true }
serde = { workspace = true }
deser-hjson = { workspace = true }
rand = { workspace = true }
22 changes: 1 addition & 21 deletions notify-debouncer-full/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,7 @@ A debouncer for [notify] that is optimized for ease of use.

## Features

- `crossbeam` enabled by default, for crossbeam channel support.

This may create problems used in tokio environments. See [#380](https://github.com/notify-rs/notify/issues/380).
Use something like the following to disable it.

```toml
notify-debouncer-full = { version = "*", default-features = false }
```

This also passes through to notify as `crossbeam-channel` feature.

On MacOS, when disabling default features, enable either the `macos_fsevent` feature
or, on latest MacOS, the `macos_kqueue` feature to be passed through to notify.

```toml
# Using FSEvents
notify-debouncer-full = { version = "*", default-features = false, features = ["macos_fsevent"] }

# Using Kernel Queues
notify-debouncer-full = { version = "*", default-features = false, features = ["macos_kqueue"] }
```
- `crossbeam-channel` passed down to notify, off by default

- `serialization-compat-6` passed down to notify, off by default

Expand Down
4 changes: 1 addition & 3 deletions notify-debouncer-full/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@
//!
//! The following crate features can be turned on or off in your cargo dependency config:
//!
//! - `crossbeam` enabled by default, adds [`DebounceEventHandler`](DebounceEventHandler) support for crossbeam channels.
//! Also enables crossbeam-channel in the re-exported notify. You may want to disable this when using the tokio async runtime.
//! - `serde` enables serde support for events.
//! - `crossbeam` passed down to notify, off by default
//! - `serialization-compat-6` passed down to notify, off by default
//!
//! # Caveats
Expand Down
28 changes: 10 additions & 18 deletions notify-debouncer-mini/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
[package]
name = "notify-debouncer-mini"
version = "0.4.1"
edition = "2021"
rust-version = "1.63"
description = "notify mini debouncer for events"
documentation = "https://docs.rs/notify-debouncer-mini"
homepage = "https://github.com/notify-rs/notify"
repository = "https://github.com/notify-rs/notify.git"
authors = ["Aron Heinecke <[email protected]>"]
keywords = ["events", "filesystem", "notify", "watch"]
license = "MIT OR Apache-2.0"
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
name = "notify_debouncer_mini"
path = "src/lib.rs"
rust-version = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }

[features]
default = ["crossbeam","macos_fsevent"]
default = ["macos_fsevent"]
serde = ["notify-types/serde"]
# can't use dep:crossbeam-channel and feature name crossbeam-channel below rust 1.60
crossbeam = ["crossbeam-channel","notify/crossbeam-channel"]
serialization-compat-6 = ["notify/serialization-compat-6"]
crossbeam-channel = ["dep:crossbeam-channel", "notify/crossbeam-channel"]
macos_fsevent = ["notify/macos_fsevent"]
macos_kqueue = ["notify/macos_kqueue"]

[dependencies]
notify = { version = "6.1.1", path = "../notify", default-features = false }
notify-types = { version = "1.0.0", path = "../notify-types" }
crossbeam-channel = { version = "0.5", optional = true }
log = "0.4.17"
notify = { workspace = true }
notify-types = { workspace = true }
crossbeam-channel = { workspace = true, optional = true }
log = { workspace = true }
21 changes: 1 addition & 20 deletions notify-debouncer-mini/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,8 @@ Tiny debouncer for [notify]. Filters incoming events and emits only one event pe

## Features

- `crossbeam` enabled by default, for crossbeam channel support.
- `crossbeam-channel` passed down to notify, off by default

This may create problems used in tokio environments. See [#380](https://github.com/notify-rs/notify/issues/380).
Use something like the following to disable it.

```toml
notify-debouncer-mini = { version = "*", default-features = false }
```

This also passes through to notify as `crossbeam-channel` feature.

On MacOS, when disabling default features, enable either the `macos_fsevent` feature
or, on latest MacOS, the `macos_kqueue` feature to be passed through to notify.

```toml
# Using FSEvents
notify-debouncer-mini = { version = "*", default-features = false, features = ["macos_fsevent"] }

# Using Kernel Queues
notify-debouncer-mini = { version = "*", default-features = false, features = ["macos_kqueue"] }
```
- `serde` for serde support of event types, off by default

- `serialization-compat-6` passed down to notify, off by default
Expand Down
5 changes: 2 additions & 3 deletions notify-debouncer-mini/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@
//!
//! The following crate features can be turned on or off in your cargo dependency config:
//!
//! - `crossbeam` enabled by default, adds [`DebounceEventHandler`](DebounceEventHandler) support for crossbeam channels.
//! Also enables crossbeam-channel in the re-exported notify. You may want to disable this when using the tokio async runtime.
//! - `serde` enables serde support for events.
//! - `crossbeam` passed down to notify, off by default
//! - `serde` enables serde support for events, off by default
//! - `serialization-compat-6` passed down to notify, off by default
//!
//! # Caveats
Expand Down
Loading

0 comments on commit 9bfa286

Please sign in to comment.