Skip to content

make locate and updatedb work on Windows #704

Open
sylvestre wants to merge 1 commit into
uutils:mainfrom
sylvestre:locate-updatedb-windows
Open

make locate and updatedb work on Windows #704
sylvestre wants to merge 1 commit into
uutils:mainfrom
sylvestre:locate-updatedb-windows

Conversation

@sylvestre
Copy link
Copy Markdown
Contributor

No description provided.

@sylvestre sylvestre force-pushed the locate-updatedb-windows branch from fe22da6 to f46e955 Compare June 6, 2026 08:50
@sylvestre sylvestre changed the title Locate updatedb windows make locate and updatedb work on Windows Jun 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.04%. Comparing base (33703b7) to head (cc54615).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/locate/mod.rs 75.00% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #704      +/-   ##
==========================================
- Coverage   92.05%   92.04%   -0.02%     
==========================================
  Files          35       35              
  Lines        7090     7099       +9     
  Branches      367      370       +3     
==========================================
+ Hits         6527     6534       +7     
- Misses        420      421       +1     
- Partials      143      144       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 6, 2026

Merging this PR will not alter performance

✅ 13 untouched benchmarks


Comparing sylvestre:locate-updatedb-windows (cc54615) with main (33703b7)

Open in CodSpeed

locate and updatedb were Unix-only (gated behind cfg and stubbed out on
Windows). Make them cross-platform:

- locate: decode raw DB entries via a platform-specific bytes_to_path
  (verbatim bytes on Unix, lossy UTF-8 elsewhere), use Metadata::len()
  instead of the unix-only size(), and a cross-platform make_symlink in
  tests that skips gracefully when symlink creation is unprivileged.
- drop the #[cfg(unix)] gate on the locate module and the
  "unsupported on Windows" main stubs for locate/updatedb.
- db_tests: remove #[cfg(not(windows))] gates, write updatedb output to
  a tempdir instead of /dev/null, and add a full updatedb->locate
  roundtrip test that is platform-independent.
@sylvestre sylvestre force-pushed the locate-updatedb-windows branch from f46e955 to cc54615 Compare June 6, 2026 08:58
@sylvestre sylvestre marked this pull request as ready for review June 6, 2026 09:00
@sylvestre sylvestre requested a review from cakebaker June 6, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant