8000 Wrap walkdir::DirEntry in a new type by tavianator · Pull Request #436 · uutils/findutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Wrap walkdir::DirEntry in a new type #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 14, 2024
Merged

Conversation

tavianator
Copy link
Contributor
@tavianator tavianator commented Aug 8, 2024

Includes #420.

Closes #12. Closes #308. Closes #379. Closes #412. Closes #440. Implements the Metadata caching part of #430.

Copy link
github-actions bot commented Aug 8, 2024

Commit 65019fb has GNU testsuite comparison:

Run BFS tests: Changes from main: PASS +34 / SKIP +0 / FAIL -34
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 227 / SKIP: 1 / FAIL: 60
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 663 / PASS: 473 / FAIL: 187 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 

Copy link
github-actions bot commented Aug 8, 2024

Commit a7a5e4d has GNU testsuite comparison:

Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 663 / PASS: 473 / FAIL: 187 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 
Run BFS tests: Changes from main: PASS +34 / SKIP +0 / FAIL -34
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 227 / SKIP: 1 / FAIL: 60

Copy link
codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 78.65169% with 76 lines in your changes missing coverage. Please review.

Project coverage is 66.31%. Comparing base (465856c) to head (7b97d74).
Report is 1 commits behind head on main.

Files Patch % Lines
src/find/matchers/entry.rs 80.86% 23 Missing and 8 partials ⚠️
src/find/matchers/mod.rs 58.33% 10 Missing and 10 partials ⚠️
src/find/matchers/printf.rs 64.70% 3 Missing and 3 partials ⚠️
src/find/matchers/samefile.rs 61.53% 2 Missing and 3 partials ⚠️
src/find/matchers/type_matcher.rs 87.50% 1 Missing and 3 partials ⚠️
src/find/matchers/delete.rs 57.14% 1 Missing and 2 partials ⚠️
src/find/matchers/group.rs 50.00% 0 Missing and 2 partials ⚠️
src/find/matchers/user.rs 50.00% 0 Missing and 2 partials ⚠️
src/find/mod.rs 90.90% 1 Missing and 1 partial ⚠️
src/find/matchers/time.rs 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #436      +/-   ##
==========================================
+ Coverage   66.08%   66.31%   +0.22%     
==========================================
  Files          34       35       +1     
  Lines        4043     4278     +235     
  Branches      917      958      +41     
==========================================
+ Hits         2672     2837     +165     
- Misses       1000     1041      +41     
- Partials      371      400      +29     

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

@tavianator tavianator marked this pull request as ready for review August 9, 2024 14:24
Copy link
github-actions bot commented Aug 9, 2024

Commit 72bb813 has GNU testsuite comparison:

Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 663 / PASS: 473 / FAIL: 187 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 
Run BFS tests: Changes from main: PASS +34 / SKIP +0 / FAIL -34
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 227 / SKIP: 1 / FAIL: 60

@sylvestre
Copy link
Contributor

Impressive:

Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 
Run BFS tests: Changes from main: PASS +34 / SKIP +0 / FAIL -34

Copy link
github-actions bot commented Aug 9, 2024

Commit 276ebda has GNU testsuite comparison:

Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 663 / PASS: 473 / FAIL: 187 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 
Run BFS tests: Changes from main: PASS +34 / SKIP +0 / FAIL -34
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 227 / SKIP: 1 / FAIL: 60

Copy link
github-actions bot commented Aug 9, 2024

Commit 28f1a43 has GNU testsuite comparison:

Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 663 / PASS: 473 / FAIL: 187 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 
Run BFS tests: Changes from main: PASS +35 / SKIP +0 / FAIL -35
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 228 / SKIP: 1 / FAIL: 59

Copy link
github-actions bot commented Aug 9, 2024

Commit d5a3423 has GNU testsuite comparison:

Run BFS tests: Changes from main: PASS +35 / SKIP +0 / FAIL -35
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 228 / SKIP: 1 / FAIL: 59
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 663 / PASS: 473 / FAIL: 187 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 

Copy link

Commit aba5c66 has GNU testsuite comparison:

Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 659 / PASS: 477 / FAIL: 179 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 
Run BFS tests: Changes from main: PASS +34 / SKIP +0 / FAIL -34
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 230 / SKIP: 1 / FAIL: 57

Copy link

Commit b194948 has GNU testsuite comparison:

Run BFS tests: Changes from main: PASS +34 / SKIP +0 / FAIL -34
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 230 / SKIP: 1 / FAIL: 57
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 659 / PASS: 477 / FAIL: 179 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 

hanbings and others added 9 commits August 12, 2024 13:33
find_time() relies on the working directory, but e.g.
delete_on_dot_dir() will temporarily change directories, causing
find_time() to fail when run in parallel.
The global exit code can polute the results of other tests.

Link: uutils/coreutils#5777
The new type wraps DirEntry when possible, but also lets us pass a valid
entry to matchers when walkdir returns a broken symlink error.  It also
implements a Metadata cache (part of uutils#430).
Copy link

Commit 7b97d74 has GNU testsuite comparison:

Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O2 is now passing!
Run GNU findutils tests: Congrats! The GNU test follow-basic.new-O3 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O0 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O1 is now passing!
Run GNU findutils tests: Congrats! The GNU test posix-dflt.new-O2 is now passing!
Run GNU findutils tests: GNU tests summary = TOTAL: 659 / PASS: 477 / FAIL: 179 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +28 / FAIL -67 / ERROR +0 / SKIP +0 
Run BFS tests: Changes from main: PASS +34 / SKIP +0 / FAIL -34
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 230 / SKIP: 1 / FAIL: 57

@hanbings
Copy link
Collaborator

Will there be more updates here? Should we merge it?
Anyway this is a legendary PR, thanks! :)

@tavianator
Copy link
Contributor Author

This should be good to go! Thanks

@hanbings hanbings merged commit a7a73c3 into uutils:main Aug 14, 2024
19 checks passed
@tavianator tavianator deleted the walk-entry branch August 14, 2024 20:21
tavianator added a commit to tavianator/findutils that referenced this pull request Mar 28, 2025
The uucore function has the downside of leaking the failure state
between unrelated tests, because the exit code is global.  PR uutils#436
introduced a method on MatcherIO which solves the problem, but future
PRs added new uses of uucore::error::set_exit_code().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants
0