phiresky / ripgrep-all

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.
Other
6.4k stars 148 forks source link

`Error: Broken pipe (os error 32)` on `-l` with `--rga-acurate` #186

Closed Neved4 closed 7 months ago

Neved4 commented 9 months ago

Describe the bug ripgrep-all fails when -l is combined with slow matching. Removing -l results in no errors.

To Reproduce

Combine --rga-accurate with --files-with-matches on an undefined file extension that'll rely on slow matchers.

Attach example file: test.gz (rename to .als)

Command

rga -l --rga-accurate -e 'pattern' -g '*.als'

Output

-------------------------------------------------------------------------------
adapter: decompress
Error: Broken pipe (os error 32)
-------------------------------------------------------------------------------
Documents/test.als: 

Operating System and Version macOS 13.5.2 (ARM64)

Output of rga --version ripgrep-all 0.9.6

phiresky commented 7 months ago

I think this is fixed in 1.0.0-alpha.5 since the process preproc process without error if rg stops reading: https://github.com/phiresky/ripgrep-all/blob/3ccf371fa6b8281b81ce0191af39ddfc5357fcb6/src/bin/rga-preproc.rs#L43-L44 . I at least cannot reproduce this anymore with the given example file.

Neved4 commented 7 months ago

@phiresky LGTM! 🎉 🚀