Releases: charlievieth/fastwalk
v1.0.14 Fix readInt tests on s390x (for real this time)
v1.0.14
- internal/dirent: fix tests on s390x: #65
This release actually fixes the internal/dirent/readInt tests on s390x. Release v1.0.13 was meant to fix the tests but introduced a new test failure (which I didn't catch due to not having access to a s390x box).
NB: The only change here is the test.
v1.0.13 Fix readInt tests on s390x and update minimum Go version to 1.21
Fix tests on Windows/MSYS and improve test coverage
v1.0.12
commit fc359aa
Author: Charlie Vieth [email protected]
Date: Fri Jun 20 02:04:34 2025 -0400
README: remove codecov link
commit 0c0cafe
Author: Charlie Vieth [email protected]
Date: Fri Jun 20 01:44:41 2025 -0400
internal/dirent: add tests for readInt
commit a22fcf9
Author: Charlie Vieth [email protected]
Date: Fri Jun 20 00:37:47 2025 -0400
Add codecov config to ignore internal/dirent filees
commit d277324
Author: Charlie Vieth [email protected]
Date: Fri Jun 20 00:35:27 2025 -0400
README: add codecov link
commit 5449d11
Author: Charlie Vieth [email protected]
Date: Thu Jun 19 23:40:59 2025 -0400
internal/dirent: move arch dependent code to make codecov happy
This is a pointless commit that simply moves the arch specific readInt*
functions to their respective build tagged files. The goal here is to
make codecov report a faired value (I don't really care about this, but
some do so here we are).
commit e692243
Author: Charlie Vieth [email protected]
Date: Tue Jun 3 19:31:56 2025 -0400
gh: fix codeql analysis
commit f4026d6
Author: Charlie Vieth [email protected]
Date: Wed May 14 22:28:08 2025 -0400
scripts/bench_comp: fixup benchmark script
commit bc5b513
Author: Charlie Vieth [email protected]
Date: Wed Apr 2 22:49:57 2025 -0400
fastwalk: add example tests
commit d740698
Author: Charlie Vieth [email protected]
Date: Wed May 14 20:23:21 2025 -0400
fastwalk: fix tests for Windows/MSYS
This commit fixes the tests so that they work when ran under MSYS on
Windows (and Git Bash). The issue is that on MSYS we default to using
forward slashes so direct path comparisons failed - the fix is to
normalize the paths before comparison.
commit 6965c86
Author: Charlie Vieth [email protected]
Date: Wed May 14 20:57:46 2025 -0400
fastwalk: fix comment in LongFileName test
v1.0.11 Add support for limiting traversal depth
v1.0.11
This release adds two new features that make replicating the --max-depth option of CLI tools like rg and fd simpler. The first is that the fastwalk.DirEntry interface now has a Depth() method which returns the depth of the entry relative to the root being walked (this is useful when manually controlling traversal depth). The second is the new fastwalk.Config.MaxDepth field which will automatically limit traversal depth. Additionally, both features are compatible with symlinks.
Commits:
commit 5623863
Author: Charlie Vieth [email protected]
Date: Wed May 14 19:21:30 2025 -0400
fastwalk. Add Config.MaxDepth field to limit traversal depth
This commit adds the Config.MaxDepth field which limits the depth of
directory traversal to MaxDepth levels beyond the root directory being
walked. By default, there is no limit on the search depth and a value of
zero or less disables this feature.
commit 3d5486c
Author: Charlie Vieth [email protected]
Date: Wed May 7 19:45:15 2025 -0400
fastwalk: add new DirEntry.Depth method
The new DirEntry Depth method returns the depth at which the entry was
generated relative to the root being walked. This is useful for programs
that wish to limit traversal depth.
v1.0.10 Update default number of workers used on macOS/Darwin
v1.0.10
This release primarily updates DefaultNumWorkers for recent versions of Darwin/macOS since APFS performance has improved for parallel access. The rest of the commits simply update CI tests.
commit 91fba48
Author: Charlie Vieth [email protected]
Date: Fri Mar 7 21:22:04 2025 -0500
fastwalk: update Darwin values for DefaultNumWorkers
This commit updates DefaultNumWorkers for recent versions of
Darwin/macOS since APFS performance has improved for parallel
access.
```
$ go test -run XXX -bench 'BenchmarkFastWalkNumWorkers' -benchmem -count 3
goos: darwin
goarch: arm64
pkg: github.com/charlievieth/fastwalk
cpu: Apple M4 Pro
BenchmarkFastWalkNumWorkers/NoOp/2-14 79 14148633 ns/op 2609565 B/op 47022 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/2-14 80 14094588 ns/op 2609550 B/op 47022 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/2-14 84 14637930 ns/op 2609919 B/op 47023 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/4-14 120 12065573 ns/op 2605615 B/op 47024 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/4-14 120 9889337 ns/op 2605887 B/op 47024 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/4-14 120 10195627 ns/op 2605582 B/op 47024 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/6-14 100 10942185 ns/op 2609385 B/op 47028 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/6-14 100 10971918 ns/op 2608213 B/op 47028 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/6-14 100 10973288 ns/op 2606743 B/op 47026 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/8-14 100 10754362 ns/op 2611974 B/op 47030 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/8-14 100 10785432 ns/op 2611854 B/op 47029 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/8-14 100 10737051 ns/op 2611918 B/op 47031 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/10-14 100 10858743 ns/op 2613452 B/op 47035 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/10-14 100 10822169 ns/op 2612663 B/op 47035 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/10-14 100 10894342 ns/op 2612256 B/op 47033 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/12-14 100 11385580 ns/op 2612864 B/op 47036 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/12-14 100 11716318 ns/op 2612726 B/op 47035 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/12-14 100 11700127 ns/op 2613368 B/op 47035 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/14-14 88 12586038 ns/op 2612940 B/op 47038 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/14-14 90 12985992 ns/op 2614281 B/op 47037 allocs/op
BenchmarkFastWalkNumWorkers/NoOp/14-14 84 13034864 ns/op 2613378 B/op 47037 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/2-14 72 16765335 ns/op 4299840 B/op 91473 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/2-14 63 17172566 ns/op 4299872 B/op 91474 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/2-14 70 17179273 ns/op 4299852 B/op 91473 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/4-14 91 12105571 ns/op 4297481 B/op 91489 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/4-14 93 11821604 ns/op 4297340 B/op 91488 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/4-14 93 11905724 ns/op 4296724 B/op 91488 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/6-14 100 12188158 ns/op 4300834 B/op 91496 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/6-14 100 12116235 ns/op 4301021 B/op 91498 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/6-14 100 12086306 ns/op 4301788 B/op 91496 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/8-14 100 11655618 ns/op 4306711 B/op 91507 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/8-14 100 11724508 ns/op 4306511 B/op 91507 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/8-14 98 11728361 ns/op 4306270 B/op 91507 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/10-14 100 11620025 ns/op 4308030 B/op 91515 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/10-14 100 11767371 ns/op 4308027 B/op 91516 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/10-14 100 11654052 ns/op 4307888 B/op 91516 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/12-14 99 12404402 ns/op 4309447 B/op 91526 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/12-14 98 12406126 ns/op 4308881 B/op 91525 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/12-14 100 12399437 ns/op 4309653 B/op 91526 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/14-14 94 13311879 ns/op 4308977 B/op 91524 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/14-14 94 13367483 ns/op 4308668 B/op 91519 allocs/op
BenchmarkFastWalkNumWorkers/NoIO/14-14 100 13301815 ns/op 4308814 B/op 91522 allocs/op
BenchmarkFastWalkNumWorkers/Stat/2-14 46 25569357 ns/op 8627482 B/op 103532 allocs/op
BenchmarkFastWalkNumWorkers/Stat/2-14 42 26183286 ns/op 8625687 B/op 103530 allocs/op
BenchmarkFastWalkNumWorkers/Stat/2-14 45 25584576 ns/op 8626667 B/op 103531 allocs/op
BenchmarkFastWalkNumWorkers/Stat/4-14 62 17460698 ns/op 8625443 B/op 103535 allocs/op
BenchmarkFastWalkNumWorkers/Stat/4-14 68 17496477 ns/op 8624933 B/op 103533 allocs/op
BenchmarkFastWalkNumWorkers/Stat/4-14 62 17613759 ns/op 8626020 B/op 103533 allocs/op
BenchmarkFastWalkNumWorkers/Stat/6-14 68 16198070 ns/op 8628807 B/op 103536 allocs/op
BenchmarkFastWalkNumWorkers/Stat/6-14 70 16127585 ns/op 8628775 B/op 103536 allocs/op
BenchmarkFastWalkNumWorkers/Stat/6-14 68 16261180 ns/op 8628777 B/op 103538 allocs/op
BenchmarkFastWalkNumWorkers/Stat/8-14 79 14847149 ns/op 8631387 B/op 103540 allocs/op
BenchmarkFastWalkNumWorkers/Stat/8-14 82 14767673 ns/op 8630988 B/op 103540 allocs/op
BenchmarkFastWalkNumWorkers/Stat/8-14 79 15044118 ns/op 8630500 B/op 103540 allocs/op
BenchmarkFastWalkNumWorkers/Stat/10-14 74 14559848 ns/op 8634382 B/op 103547 allocs/op
BenchmarkFastWalkNumWorkers/Stat/10-14 74 14777673 ns/op 8633235 B/op 103542 allocs/op
BenchmarkFastWalkNumWorkers/Stat/10-14 78 14525924 ns/op 8632852 B/op 103543 allocs/op
BenchmarkFastWalkNumWorkers/Stat/12-14 76 15086768 ns/op 8634241 B/op 103550 allocs/op
BenchmarkFastWalkNumWorkers/Stat/12-14 76 15245889 ns/op 8633690 B/op 103551 allocs/op
BenchmarkFastWalkNumWorkers/Stat/12-14 75 15269594 ns/op 8633958 B/op 103549 allocs/op
BenchmarkFastWalkNumWorkers/Stat/14-14 73 16315361 ns/op 8635630 B/op 103553 allocs/op
BenchmarkFastWalkNumWorkers/Stat/14-14 73 15708493 ns/op 8635310 B/op 103554 allocs/op
BenchmarkFastWalkNumWorkers/Stat/14-14 70 15530242 ns/op 8634742 B/op 103551 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/2-14 9 118187120 ns/op 5431174 B/op 103543 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/2-14 9 120523607 ns/op 5433512 B/op 103545 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/2-14 9 117043093 ns/op 5434884 B/op 103545 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/4-14 13 92554321 ns/op 5453789 B/op 103557 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/4-14 13 91875324 ns/op 5472566 B/op 103559 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/4-14 12 88067736 ns/op 5473171 B/op 103558 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/6-14 10 106561633 ns/op 5469867 B/op 103568 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/6-14 10 106176221 ns/op 5464262 B/op 103569 allocs/op
BenchmarkFastWalkNumWorkers/ReadFile/6-14 ...
v1.0.9 Fix handling of disk roots on Windows
v1.0.9
This release fixes an issue on Windows that occured when the root argument to Walk was a disk root (C:\). Instead of walking the disk root C:\ (or any other root) it walked the current directory. This occurred because we were transforming fully qualified path C:\ to the relative path C: which caused the current directory to be walked.
commit aa71a4c
Author: Charlie Vieth [email protected]
Date: Fri Oct 25 10:10:04 2024 -0400
fastwalk: don't clean the path argument to Walk on Windows
On Windows don't attempt to clean the path argument to Walk since the
existing clean logic (cleanRootPath) transforms paths like "C:\" => "C:"
which are not equivalent.
This logic only existed to make the joining of paths simpler and should
probably be removed since we shouldn't be modifying user provided paths.
TODO: Investigate if anything relies on the current clean logic and
remove it if nothing does.
Fixes: https://github.com/charlievieth/fastwalk/issues/37
v1.0.8 Fix go1.20 build
v1.0.8
commit 1fb2d4d
Author: Charlie Vieth [email protected]
Date: Thu Jul 18 10:00:29 2024 -0400
fix go 1.20 build and retract v1.0.7
This commit fixes the build for Go 1.20 by removing use of the slices
package and retracts the v1.0.7 release.
It also changes the CI to test go1.20 (our minimum supported version)
so that this will not happen again in the future.
v1.0.7 Add optional sorting and automatically detect if forward slashes should be used
v1.0.7
This release changes the detection for ToSlash on Windows to only check is the "MSYSTEM" environment variable is set and removes the detection for Windows Subsystem on Linux (WSL) since it was unreliable (additionally tools like fd do not attempt to detect if running under WSL).
It also adds a new feature: the ability to sort directory entries before being processed. This does not make the order that directories and files are visited globally deterministic, but it does significantly improve the output Walk and is useful for tools that print said output.
commit 861d712
Author: Charlie Vieth [email protected]
Date: Thu Jul 11 00:39:35 2024 -0400
fastwalk: add optional sorting and improve documentation
This commit adds the new SortMode and Config.Sort setting to sort
a directory's entries before they are processed. This does not make
the global order that directories and entries are visited
non-deterministic but it does help make the output a bit saner compared
to the default directory order. This was added to make the output of FZF
a bit nicer.
This commit also improves documentation and comments of exported
functions.
commit 875daa3
Author: Charlie Vieth [email protected]
Date: Tue Jul 16 12:50:55 2024 -0400
fastwalk: only check if MSYSTEM is set during MSYS/MSYS2
This changes the MSYS/MSYS2 detection to only check if the MSYSTEM
environment variable is set instead of asserting on its value. This
is to support other MSYS environments like UCRT64.
It also removes the check for Windows Subsystem for Linux (WSL) since
it was unreliable and required us to stat and potentially read a file
on initialization (which is bad).
See:
* https://github.com/charlievieth/fastwalk/commit/87029d9318159fb714bd064bbda22d69a11fa9f2#r144282929
* https://github.com/sharkdp/fd/commit/f875ea9a5
commit 87029d9
Author: Charlie Vieth [email protected]
Date: Wed Jul 3 14:59:17 2024 -0400
fastwalk: add MSYS/MSYS2 detection to DefaultToSlash
This change updates DefaultToSlash to also check if we're running in a
MSYS/MSYS2 enviroment since they also use forward slashes.
v1.0.6: fix go1.20 build
v1.0.6
commit 3ec5a9e
Author: Charlie Vieth [email protected]
Date: Wed Jul 3 02:58:43 2024 -0400
fastwalk: remove use of go1.21 features
fastwalk: remove use of go1.21 features to fix fzf build
v1.0.5: add ToSlash option and replace getdirentries64 with readdir_r on macOS
v1.0.5
commit 0446dfe
Author: Charlie Vieth [email protected]
Date: Wed Jul 3 01:21:34 2024 -0400
fastwalk: add ToSlash option for enforcing forward-slash paths
This commit adds the Config.ToSlash option which forces paths to be
joined with a forward-slash instead of the default OS path separator.
This mostly applies to Go binaries that are compiled for Windows but
run under the Windows Subsystem for Linux (WSL) so this commit also
adds a helper function DefaultToSlash which detects if we're a Windows
exe running in WSL.
commit 22a282e (master)
Author: Charlie Vieth [email protected]
Date: Tue Jul 2 15:00:22 2024 -0400
mod: update go version to 1.20
commit d4d0d43
Author: Charlie Vieth [email protected]
Date: Sat Jun 29 15:36:06 2024 -0400
dirent: handle nil DirEntry in StatDirEntry
commit ca81468
Author: Charlie Vieth [email protected]
Date: Tue Jul 2 14:22:14 2024 -0400
gh: test on macos arm64
commit b2d5e56
Author: Charlie Vieth [email protected]
Date: Tue Jul 2 14:12:03 2024 -0400
darwin: cleanup syscall code and use a fixed buffer for opendir
Remove unused syscall code and use a fixed buffer for opendir which
saves us an alloc.
commit e515b65
Author: Charlie Vieth [email protected]
Date: Sat Jun 22 01:10:08 2024 -0400
darwin: replace getdirentries64 with readdir_r
The performance benefit of getdirentries64 was negligible to
non-existent and added a huge support burden code wise.