Skip to content

chore(deps): bump fs4 from 0.13.1 to 1.0.1#1385

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/fs4-1.0.1
Open

chore(deps): bump fs4 from 0.13.1 to 1.0.1#1385
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/fs4-1.0.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 23, 2026

Copy link
Copy Markdown
Contributor

Bumps fs4 from 0.13.1 to 1.0.1.

Release notes

Sourced from fs4's releases.

v1.0.0

1.0.0

Breakage

  • Renamed FileExt::lock_exclusive / AsyncFileExt::lock_exclusive to lock, matching the stabilized [std::fs::File::lock] API.
  • Renamed FileExt::try_lock_exclusive / AsyncFileExt::try_lock_exclusive to try_lock, matching [std::fs::File::try_lock].
  • Changed the return type of try_lock and try_lock_shared from std::io::Result<bool> to Result<(), TryLockError>. Ok(()) still indicates the lock was acquired; Err(TryLockError::WouldBlock) now indicates the lock is held by another handle. This matches the stable [std::fs::File::try_lock] signature (Ok(false) was the nightly shape prior to 1.89).
  • Removed the top-level lock_contended_error() helper. Use TryLockError::WouldBlock instead.
  • Flattened the fs_std module: the FileExt trait for std::fs::File now lives at the crate root. Update imports from use fs4::fs_std::FileExt; to use fs4::FileExt;. All other backends (fs_err2, fs_err3, tokio, smol, async_std, fs_err2_tokio, fs_err3_tokio) remain nested, since each defines its own FileExt/AsyncFileExt over a different concrete File type.

Additions

  • New fs4::TryLockError enum, mirroring [std::fs::TryLockError] with Error(io::Error) and WouldBlock variants. Implements Debug, Display, std::error::Error (with source() exposing the inner io::Error), From<io::Error> (kind WouldBlock collapses into the WouldBlock variant; everything else wraps into Error), and From<TryLockError> for io::Error (WouldBlock becomes io::Error::from(io::ErrorKind::WouldBlock); Error(inner) passes through verbatim).

Fixes

  • Fixed feature typos that made the crate fail to compile with only fs-err2, fs-err3, fs-err2-tokio, or fs-err3-tokio enabled (without sync / tokio). #[cfg(feature = "fs-err")] and feature = "fs-err-tokio" both referenced feature names that do not exist in Cargo.toml.
  • On Windows, skip the internal set_len call when the file's existing cluster-aligned allocation already covers len. Avoids the Windows buffered-I/O quirks observed when the end-of-file pointer is moved inside an already-allocated cluster (#13). The trait doc now carves this behavior out from the general "file size is at least len bytes" contract.
  • Short-circuited allocate on Unix when the file is already at least

... (truncated)

Changelog

Sourced from fs4's changelog.

1.0.1

Fixes

  • Unix allocate: short-circuit on allocated blocks (metadata().blocks() * 512 >= len) instead of logical EOF. The previous metadata().len() >= len check silently turned allocate into a no-op on sparse files (logical length large, zero blocks reserved), violating the documented preallocation guarantee. The new check still skips the macOS F_PREALLOCATE re-allocate-ENOSPC path from #15, since it asks the right question: "are the blocks already reserved?" Applies to both the sync and async implementations.
  • Windows statvfs: route the three GetDiskFreeSpaceExW outputs correctly. free_space now comes from lpTotalNumberOfFreeBytes (volume-wide, quota-independent), available_space from lpFreeBytesAvailable (caller-scoped, honours per-user quotas), and total_space is computed from cluster math (sectors_per_cluster * bytes_per_sector * total_number_of_clusters) so it reports volume capacity rather than the caller's quota. On quota-enabled volumes the three fields now carry distinct, documented meanings; previously free_space and available_space were identical and total_space under-reported capacity.
  • Added target_os = "fuchsia" to the Unix allocate fallocate branch (sync and async). Fuchsia is cfg(unix) under rustc and rustix exposes fallocate there, so the previous omission left the Fuchsia Unix build without an allocate symbol once FileExt was enabled. With this fix, every fs4 feature builds on Fuchsia except fs-err3 and fs-err3-tokio; those remain blocked on fs-err v3.3.0 referencing std::os::unix::fs::chroot, which rustc gates out on target_os = "fuchsia". The fs4 code no longer has a Fuchsia gap — the remaining one is upstream (andrewhickman/fs-err#90).

Testing

  • New regression test allocate_reserves_blocks_on_sparse_file (sync and async, Linux-gated) creates a sparse file via set_len, asserts allocated_size == 0, calls allocate, and asserts blocks are reserved.

Documentation

  • README gained a Minimum Supported Rust Version section noting that the crate's declared MSRV (rust-version = "1.75.0") covers the default sync feature, and that async-std / smol inherit a higher effective MSRV (1.85) from their transitive dependencies (async-lock, async-signal).

1.0.0

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [fs4](https://github.com/al8n/fs4-rs) from 0.13.1 to 1.0.1.
- [Release notes](https://github.com/al8n/fs4-rs/releases)
- [Changelog](https://github.com/al8n/fs4-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/al8n/fs4-rs/commits)

---
updated-dependencies:
- dependency-name: fs4
  dependency-version: 1.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants