summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-08-28ci: replace mips with powerpc64, aarch64 and s390xag/fix-ciAndrew Gallant
We drop our MIPS target because it no longer works.[1] We were previously using it as a means of testing ripgrep in a big endian environment. So to achieve that without MIPS, we test on powerpc64 and s390x. (No particular reason to do both, but why not.) We also add aarch64 as a proxy for at least ensuring everything works for the same architecture as Apple silicon. It's not a guarantee that everything works, but it seems better than nothing until we can actually test Apple silicon in CI. [1]: https://github.com/rust-lang/regex/commit/c788378d6fe407f4774df98a78436cea5d98525b
2023-08-28ignore: apply rustfmtAndrew Gallant
I believe this happened because rustfmt now knows how to format `let ... else` constructs.
2023-08-28deps: bump everything elseAndrew Gallant
2023-08-28deps: bump regex, regex-automata and regex-syntaxAndrew Gallant
2023-08-28deps: bump memchr to 2.6.0Andrew Gallant
This in particular brings in a PR[1] that provides huge speedups on aarch64 (e.g., Apple silicon). [1]: https://github.com/BurntSushi/memchr/pull/129
2023-08-21ignore/types: add Prolog file typesmataha
This improves the Prolog file type rules. * `.pl` is the most common extension in the wild, though `.pro` is preferred in places where file extension may clash with Perl[1]. * `.P` is used for compatibility with XSB Prolog dialect[2]. PR #2590 [1]: https://www.swi-prolog.org/pldoc/man?section=fileext [2]: https://www.swi-prolog.org/pldoc/man?section=xsb-source
2023-08-20ignore/types: tweak Gradle file typesmataha
This PR extends Gradle file types with the following: - Kotlin DSL buildscripts (`*.gradle.kts`) - Gradle Java properties (`gradle.properties`) - wrapper files (`gradle-wrapper.*`) - wrapper scripts (`gradlew`, `gradlew.bat`) PR #2587
2023-08-15deps: update everythingAndrew Gallant
2023-08-15deps: update aho-corasickAndrew Gallant
This brings in [1,2], which improves memory usage substantially when Aho-Corasick is used. [1]: https://github.com/BurntSushi/aho-corasick/pull/120 [2]: https://github.com/BurntSushi/aho-corasick/pull/121
2023-08-05globset-0.4.13globset-0.4.13Andrew Gallant
2023-08-05globset: use non-capture groups in regex transformAndrew Gallant
We currently implement globs by converting them to regexes, and in doing so, sometimes use grouping. In all but one case, we used non-capturing groups. But for alternations, we used capturing groups, which was likely just an oversight. We don't make use of capture groups at all, and while they usually don't have any overhead, they lead to weird cases like this one: https://github.com/rust-lang/regex/issues/1059 That particular issue is also a bug in the regex crate itself, which is fixed in https://github.com/rust-lang/regex/pull/1062. Note though that the bug fix in the regex crate is required. Even with this patch to globset, memory usage is reduced (by about half in rust-lang/regex#1059) but is not returned to where it was prior to the regex 1.9 release.
2023-07-31regex: fix fast path for -w/--word-regexp flag (#2576)Andrew Gallant
It turns out our fast path for -w/--word-regexp wasn't quite correct in some cases. Namely, we use `(?m:^|\W)(<original-regex>)(?m:\W|$)` as the implementation of -w/--word-regexp since `\b(<original-regex>)\b` has some unintuitive results in certain cases, specifically when <original-regex> matches non-word characters at match boundaries. The problem is that using this formulation means that you need to extract the capture group around <original-regex> to find the "real" match, since the surrounding (^|\W) and (\W|$) aren't part of the match. This is fine, but the capture group engine is usually slow, so we have a fast path where we try to deduce the correct match boundary after an initial match (before running capture groups). The problem is that doing this is rather tricky because it's hard to know, in general, whether the `^` or the `\W` matched. This still doesn't seem quite right overall, but we at least fix one more case. Fixes #2574
2023-07-31ignore/types: add csprojVidar
Supports the .NET C# Project file extension. PR #2575
2023-07-26globset-0.4.12globset-0.4.12Andrew Gallant
2023-07-26api: impl Deserialize for GlobSetDavid Tolnay
PR #2569
2023-07-18grep-cli-0.1.9grep-cli-0.1.9Andrew Gallant
2023-07-12globset-0.4.11globset-0.4.11Andrew Gallant
2023-07-10ignore/types: add Windows Command Prompt filesmataha
This PR adds `*.bat` and `*.cmd` file types. In doing so, it makes a distinction between batch files (old standard from the MS-DOS era) and command scripts (new flavor - can operate on batch files, although `*.cmd` is preferred for various reasons, the main one being batch files will set `ERRORLEVEL` following inconsistent MS-DOS style rules[1]). PR #2556 [1]: https://groups.google.com/g/microsoft.public.win2000.cmdprompt.admin/c/XHeUq8oe2wk/m/LIEViGNmkK0J#i106
2023-07-09ci/release: use latest OS versionsAndrew Gallant
2023-07-09ci/release: add sha256 sums to release artifactsxEgoist
Fixes #1924, Closes #2168
2023-07-09github: remove dependabot configurationAndrew Gallant
This does not seem to have worked at all. For example, there were Actions being used that were clearly deprecated/archived[1]. But Dependabot didn't make a peep. So just get rid of it to avoid the false sense that someone is checking our dependencies for us. [1]: https://github.com/BurntSushi/ripgrep/pull/2360
2023-07-09cli: fix non-path sorting behaviornguyenvukhang
Previously, sorting worked by sorting the parents and then sorting the children within each parent. This was done during traversal, but it only works when sorting parents preserves the overall order. This generally only works for '--sort path' in ascending order. This commit fixes the rest of the sorting behavior by collecting all of the paths to search and then sorting them before searching. We only collect all of the paths when sorting was requested. Fixes #2243, Closes #2361
2023-07-08cli: add --stop-on-nonmatch flagEdoardo Pirovano
This causes ripgrep to stop searching an individual file after it has found a non-matching line. But this only occurs after it has found a matching line. Fixes #1790, Closes #1930
2023-07-08core: lock stdout before printing an error message to stderrGarrett Thornburg
Adds a new eprintln_locked macro which locks STDOUT before logging to STDERR. This patch also replaces instances of eprintln with eprintln_locked to avoid interleaving lines. Fixes #1941, Closes #1968
2023-07-08globset: add 'escape' routinepiegames
Fixes #2060, Closes #2061
2023-07-08cli: force binary existance checkSeth Stadick
Previously, we were only doing a binary existence check on Windows. And in fact, the main point there wasn't binary existence, but ensuring we didn't accidentally resolve a binary name relative to the CWD, which could result in executing a program one didn't mean to run. However, it is useful to be able to check whether a binary exists on any platform when associating a glob with a binary. If the binary doesn't exist, then the association can fail eagerly and let some other glob apply. Closes #1946
2023-07-08cargo: reduce the size of the .crate file published to crates.ioKevin Svetlitski
None of this stuff is needed for the main ripgrep crate. Closes #1940
2023-07-08doc: clarify the comment on `Worker.work_done`Michal Terepeta
We call `work_done` only once the work has been actually performed (otherwise `num_pending` could go to 0 before the actual work is done). Closes #2039
2023-07-08doc: improve -r/--replace flag syntax docsKyle Todeschini
Fixes #2108, Closes #2123
2023-07-08readme: add 'yum-utils' to RHEL/Centos instructionsAndrew Gallant
Closes #2103
2023-07-08ignore/types: name aliases for file typeskotborealis
We also make py/python, md/markdown and ts/typescript aliases of one another. Note that this only introduces aliases at the point where default types are defined. This just makes them a bit easier to read/write, and also makes it easier to expose more names that describe the same thing. Fixes #1857, Closes #1895
2023-07-08ignore/types: add 'typescript' alias for 'ts'Klas Mellbourn
Closes #2009
2023-07-08ignore/types: add Ada filetypes, including gprbuild and alireTama McGlinn
*.adb and *.ads are the usual extensions for Ada source code, and *.gpr indicates a GPRbuild project file used for Ada, and these days often being combined with alire for package dependency resolution. Alire stores a bunch of files named alire.toml in different directories in your (gitignored) cache/dependencies/... Closes #2013
2023-07-08ignore/types: add raku extensions to ignore typesJuan Francisco Cantero Hurtado
Closes #2117
2023-07-08windows: attempt to enable long path support for MSVC targetsAndrew Gallant
See the README and comments in the build.rs. Basically, this embeds an XML file that I guess is a way of setting configuration knobs on Windows. One of those knobs is enabling long path support. You still need to enable it in your registry (lol), but this will handle the other half of it. Fixes #364, Closes #2049
2023-07-08ignore/types: add MDX format to Markdown typesAndrew Gallant
Ref https://mdxjs.com/ Closes #2142
2023-07-08ignore/types: add DITA (Darwin Information Typing Architecture)chrispy
Closes #2148
2023-07-08doc: fix typoLudi Rehak
Closes #2153
2023-07-08doc: fix some typoscuishuang
Closes #2195
2023-07-08complete: add extra-verbose support to _rg_typesdana
When the extra-verbose style is set for the types tag, completed types are displayed along with the patterns they correspond to. This can be enabled by e.g. adding the following to .zshrc: zstyle ':completion:*:rg:*:types' extra-verbose true This change also makes _rg_types use the actual rg specified on the command line to look up types, and it fixes a mangled complete-all style check Fixes #2195
2023-07-08cli: '--no-ignore-dot' should also '.rgignore'Richard Sternagel
Fixes #2198, Closes #2202
2023-07-08ignore/types: fix formattingAndrew Gallant
2023-07-08ignore/types: added V typeedam
V (http://vlang.io) uses '.v' files. Closes #2302
2023-07-08readme: use 'sudo' more consistentlyAndrew Gallant
I definitely wonder whether I should just drop 'sudo' from the install instructions and just rely on the user to "know" to do it. But some commands legitimately do not require 'sudo', so there are actual differences. Overall, this feels clearer to me but reasonable people can disagree.
2023-07-08readme: add install command for ALT LinuxAndrew Savchenko
Closes #2330
2023-07-08doc: add '--hidden' to example configurationKevin Ushey
This increases visibility of the fact that hidden files are skipped by default. Closes #2356
2023-07-08ci/release: Use GITHUB_REF_NAME instead of GITHUB_REFJames McKinney
This is a nice quality of life improvement. Closes #2358
2023-07-08ci/release: use GitHub CLIJames McKinney
The old actions I was using are apparently archived because they make use of deprecated features (like `set-output`). Sigh. Closes #2360
2023-07-08globset: introduce option to keep empty alternatesAlex Rawson
Add a method GlobBuilder::empty_alternates and supporting mechanisms. Ref #1368 Closes #2369
2023-07-08globset: permit deserializing Glob from StringJérome Eertmans
Closes #2386, Closes #2388