Commit graph

22 commits

Author SHA1 Message Date
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
github-actions[bot]
c8e29f204e
chore: release (#1992)
* chore: release

* Apply suggestions from code review

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

---------

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2024-12-07 04:55:43 +00:00
dependabot[bot]
e9f25187d7
build(deps): bump the deps group with 3 updates (#1993)
* build(deps): bump the deps group with 3 updates

Bumps the deps group with 3 updates: [target-lexicon](https://github.com/bytecodealliance/target-lexicon), [cargo_toml](https://gitlab.com/lib.rs/cargo_toml) and [fs4](https://github.com/al8n/fs4-rs).


Updates `target-lexicon` from 0.12.16 to 0.13.0
- [Commits](https://github.com/bytecodealliance/target-lexicon/compare/v0.12.16...v0.13.0)

Updates `cargo_toml` from 0.20.5 to 0.21.0
- [Commits](https://gitlab.com/lib.rs/cargo_toml/commits/main)

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

---
updated-dependencies:
- dependency-name: target-lexicon
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
- dependency-name: cargo_toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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 cargo-toml in parse-meta.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-12-07 04:05:38 +00:00
github-actions[bot]
674f04f95f
chore: release (#1958)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-05 12:18:49 +00:00
dependabot[bot]
4bf3685328
build(deps): bump the deps group with 3 updates (#1954)
Bumps the deps group with 3 updates: [thiserror](https://github.com/dtolnay/thiserror), [url](https://github.com/servo/rust-url) and [fs4](https://github.com/al8n/fs4-rs).


Updates `thiserror` from 1.0.66 to 1.0.68
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.66...1.0.68)

Updates `url` from 2.5.2 to 2.5.3
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.2...v2.5.3)

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

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: url
  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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-05 10:36:13 +00:00
github-actions[bot]
a8227ae6a4
chore: release (#1928)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-12 03:58:24 +00:00
dependabot[bot]
e7f98b2a3d
build(deps): bump fs4 from 0.9.1 to 0.10.0 in the deps group (#1929)
Bumps the deps group with 1 update: [fs4](https://github.com/al8n/fs4-rs).


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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-12 01:46:19 +00:00
github-actions[bot]
cf7c8f9656
chore: release (#1853)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-04 03:04:47 +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
github-actions[bot]
6d3dcadfee
release: fs-lock v0.1.3 (#1642)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-03-09 03:33:53 +00:00
dependabot[bot]
fda8f98cdf
build(deps): bump the deps group with 2 updates (#1641)
Bumps the deps group with 2 updates: [reqwest](https://github.com/seanmonstar/reqwest) and [fs4](https://github.com/al8n/fs4-rs).


Updates `reqwest` from 0.11.24 to 0.11.25
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.24...v0.11.25)

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

---
updated-dependencies:
- dependency-name: reqwest
  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-patch
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 01:55:36 +00:00
dependabot[bot]
1fd99af959
build(deps): bump the deps group with 3 updates (#1637)
Bumps the deps group with 3 updates: [reflink-copy](https://github.com/cargo-bins/reflink-copy), [windows](https://github.com/microsoft/windows-rs) and [fs4](https://github.com/al8n/fs4-rs).


Updates `reflink-copy` from 0.1.14 to 0.1.15
- [Release notes](https://github.com/cargo-bins/reflink-copy/releases)
- [Commits](https://github.com/cargo-bins/reflink-copy/compare/0.1.14...0.1.15)

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

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

---
updated-dependencies:
- dependency-name: reflink-copy
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: windows
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 04:11:52 +00:00
github-actions[bot]
aabe107726
release: fs-lock v0.1.2 (#1497)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-11-17 01:01:45 +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
github-actions[bot]
274a1975eb
release: fs-lock v0.1.1 (#1443)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-10-07 06:10:11 +00:00
dependabot[bot]
49592890f9
build(deps): bump the deps group with 2 updates (#1441)
Bumps the deps group with 2 updates: [fs4](https://github.com/al8n/fs4-rs) and [proc-macro2](https://github.com/dtolnay/proc-macro2).


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

Updates `proc-macro2` from 1.0.67 to 1.0.68
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.67...1.0.68)

---
updated-dependencies:
- dependency-name: fs4
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-07 02:02:23 +00:00
dependabot[bot]
92fdefbc9e
Bump fs4 from 0.6.4 to 0.6.5 (#1112)
Bumps [fs4](https://github.com/al8n/fs4-rs) from 0.6.4 to 0.6.5.
- [Commits](https://github.com/al8n/fs4-rs/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 04:02:01 +00:00
dependabot[bot]
e9c7405081
Bump fs4 from 0.6.3 to 0.6.4 (#1031)
Bumps [fs4](https://github.com/al8n/fs4-rs) from 0.6.3 to 0.6.4.
- [Commits](https://github.com/al8n/fs4-rs/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-05 15:04:51 +10:00
dependabot[bot]
68f3eb81d4
Bump fs4 from 0.6.2 to 0.6.3 (#755) 2023-02-01 01:40:45 +00:00
github-actions[bot]
eb93eafb9d
release: fs-lock v0.1.0 (#339)
Co-authored-by: github-actions <github-actions@github.com>
2022-09-04 16:04:52 +00:00
Félix Saparelli
a628cbf876
Rename flock to fs-lock (#338) 2022-09-04 15:28:22 +00:00