Commit graph

7 commits

Author SHA1 Message Date
elsirion
d8ecdcaeec
fix: actually check if lock was acquired (#2091) 2025-03-19 09:41:51 +00:00
dependabot[bot]
d9da8aaba4
build(deps): bump the deps group with 3 updates (#2072)
Some checks failed
Release-plz / Release-plz (push) Has been cancelled
* build(deps): bump the deps group with 3 updates

Bumps the deps group with 3 updates: [compact_str](https://github.com/ParkMyCar/compact_str), [bzip2](https://github.com/trifectatechfoundation/bzip2-rs) and [fs4](https://github.com/al8n/fs4-rs).


Updates `compact_str` from 0.8.1 to 0.9.0
- [Changelog](https://github.com/ParkMyCar/compact_str/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ParkMyCar/compact_str/compare/v0.8.1...v0.9.0)

Updates `bzip2` from 0.5.1 to 0.5.2
- [Release notes](https://github.com/trifectatechfoundation/bzip2-rs/releases)
- [Commits](https://github.com/trifectatechfoundation/bzip2-rs/compare/v0.5.1...v0.5.2)

Updates `fs4` from 0.12.0 to 0.13.0
- [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: compact_str
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
- dependency-name: bzip2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: fs4
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix use of fs4::fs_std::FileExt::try_lock*

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2025-03-01 07:11:06 +00:00
Jiahao XU
8ee6c537e4
Log when FileLock::drop fails to unlock file (#2064)
* Add optional dependency tracing to fs-lock

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Add optional logging to FileLock::drop

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Enable fs-lock/tracing in binstalk-manifest

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Add FileLock::set_file_path

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Update create_if_not_exist to return FileLock on successs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Update create_if_not_exist usage in mod binstall_crates_v1

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Simplify create_if_not_exist

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Refactor mod crates_manifests to use create_if_not_exist

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Set file path for FileLock

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Set file path for file lock in mod cargo_config

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix fs-lock impl

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Import Path in fs-lock lib.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix fs-lock lib.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix fs-lock lib.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix typo in crates_manifests.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix calling create_if_not_exist in crates_manifests.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fox fmt crates_manifests.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix fmt in lib.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2025-02-22 14:33:36 +00:00
Jiahao XU
395a586265
Fix fs-lock error on nightly (#2059)
* Fix fs-lock error on nightly

Since File::*lock* API is stablised on 1.87, it overrides fs4::fs_std::FileExt

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix other fs-lock method

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix unit-tests when no test is run

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2025-02-22 10:21:02 +00:00
dependabot[bot]
cdbb121112
build(deps): bump the deps group across 1 directory with 2 updates (#1859)
* build(deps): bump the deps group across 1 directory with 2 updates

Bumps the deps group with 2 updates in the / directory: [fs4](https://github.com/al8n/fs4-rs) and [windows-sys](https://github.com/microsoft/windows-rs).


Updates `fs4` from 0.8.4 to 0.9.1
- [Release notes](https://github.com/al8n/fs4-rs/releases)
- [Commits](https://github.com/al8n/fs4-rs/commits)

Updates `windows-sys` from 0.52.0 to 0.59.0
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.52.0...0.59.0)

---
updated-dependencies:
- dependency-name: fs4
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
- dependency-name: windows-sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix use of fs4

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix windows.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Rm drop impl for LibraryHandle

As unmounting dynlib might cause UB

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

* Fix clippy in windows.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2024-08-03 05:03:10 +00:00
Dawid Ciężarkiewicz
645579430a
feat(fs-lock): new_try_exclusive and new_try_shared (#1496)
In certain situations it's useful to attempt to lock the file.
2023-11-16 22:35:08 +00:00
Félix Saparelli
a628cbf876
Rename flock to fs-lock (#338) 2022-09-04 15:28:22 +00:00