ripgrep provides a library https://github.com/BurntSushi/ripgrep/blob/master/crates/grep/README.md which can be easily integrated into our Rust backend. The story is that while working on #872, I found that collecting the source items by invoking the shell command rg is somewhat annoying as the shell command does not produce items linearly, the output is empty from some point and then spikes suddenly, leading to a bad user experience. Responsiveness is really important. Maybe I did something wrong to collect the source item from the shell command, but with a quick experiment, I found using the crate grep helps resolve it and it'd also remove one explicit external binary dependency, hence I think it's a good addition.
Other potential benefits:
- Once the new search syntax is supported, e.g., use
+git to include only the results from git tracked files, using the library ripgrep may help skip the unrelated files at the stage of walking the directory.
ripgrep provides a library https://github.com/BurntSushi/ripgrep/blob/master/crates/grep/README.md which can be easily integrated into our Rust backend. The story is that while working on #872, I found that collecting the source items by invoking the shell command
rgis somewhat annoying as the shell command does not produce items linearly, the output is empty from some point and then spikes suddenly, leading to a bad user experience. Responsiveness is really important. Maybe I did something wrong to collect the source item from the shell command, but with a quick experiment, I found using the crategrephelps resolve it and it'd also remove one explicit external binary dependency, hence I think it's a good addition.Other potential benefits:
+gitto include only the results from git tracked files, using the library ripgrep may help skip the unrelated files at the stage of walking the directory.