1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +02:00
Commit Graph

368 Commits

Author SHA1 Message Date
Andrew Gallant
f4d07b9cbd
grep-cli-0.1.8 2023-07-05 17:09:09 -04:00
Andrew Gallant
7b72e982f2 deps: update everything 2023-07-05 14:04:29 -04:00
Andrew Gallant
a68db3ac02 deps: drop temporary patch and move to bstr 1.6
Now that regex 1.9 is out, we can depend on it from crates.io.
2023-07-05 14:04:29 -04:00
Andrew Gallant
b12905daca deps: update everything 2023-07-05 14:04:29 -04:00
Andrew Gallant
04dde9a4eb regex: tweak DFA settings
This increases the limits a bit for when the regex engine will build and
use a fully compiled DFA. They can faster in some circumstances. For
example, '(?-u)^\w{30,}$' gets a nice speed boost from state
acceleration.

We are also able to remove `regex` proper as a dependency. Wow.
2023-07-05 14:04:29 -04:00
Andrew Gallant
81341702af regex: push more pattern handling to matcher construction
Previously, ripgrep core was responsible for escaping regex patterns and
implementing the --line-regexp flag. This commit moves that
responsibility down into the matchers such that ripgrep just needs to
hand the patterns it gets off to the matcher builder. The builder will
then take care of escaping and all that.

This was done to make pattern construction completely owned by the
matcher builders. With the arrival regex-automata, this means we can
move to the HIR very quickly and then never move back to the concrete
syntax. We can then build our regex directly from the HIR. This overall
can save quite a bit of time, especially when searching for large
dictionaries.

We still aren't quite as fast as GNU grep when searching something on
the scale of /usr/share/dict/words, but we are basically within spitting
distance. Prior to this, we were about an order of magnitude slower.

This architecture in particular lets us write a pretty simple fast path
that avoids AST parsing and HIR translation entirely: the case where one
is just searching for a literal. In that case, we can hand construct the
HIR directly.
2023-07-05 14:04:29 -04:00
Andrew Gallant
4b8aa91ae5 deps: update to pcre2 0.2.4
0.2.4 updates to PCRE2 10.42 and has a few other nice changes. For
example, when `utf` is enabled, the crate will always set the
PCRE2_MATCH_INVALID_UTF option. That means we no longer need to do
transcoding or UTF-8 validity checks.

Because of this, we actually get to remove one of the two uses of
`unsafe` in ripgrep's `main` program.

(This also updates a couple other dependencies for convenience.)
2023-07-05 14:04:29 -04:00
Andrew Gallant
a775b493fd regex: small cleanups
Just some small polishing. We also get rid of thread_local in favor of
using regex-automata, mostly just in the name of reducing dependencies.
(We should eventually be able to drop thread_local completely.)
2023-07-05 14:04:29 -04:00
Andrew Gallant
e028ea3792 regex: migrate grep-regex to regex-automata
We just do a "basic" dumb migration. We don't try to improve anything
here.
2023-07-05 14:04:29 -04:00
Andrew Gallant
1035f6b1ff deps: initial migration steps to regex 1.9
This leaves the grep-regex crate in tatters. Pretty much the entire
thing needs to be re-worked. The upshot is that it should result in some
big simplifications. I hope.

The idea here is to drop down and actually use regex-automata 0.3
instead of the regex crate itself.
2023-07-05 14:04:29 -04:00
Martin Nordholts
4fcb1b2202
cli: replace atty with std::io::IsTerminal
The `atty` crate is unmaintained[1] and `std::io::IsTerminal` was
stabilized in Rust 1.70.

[1]: https://rustsec.org/advisories/RUSTSEC-2021-0145.html

PR #2526
2023-06-05 14:00:46 -04:00
Andrew Gallant
4a7e7094ad
deps: update everything else 2023-05-25 13:06:13 -04:00
Andrew Gallant
fc0d9b90a9
deps: bump regex to 1.8.3
This brings in an update from the regex crate that fixes a matching bug
for particular kinds of alternations of literals.

Fixes #2518
2023-05-25 13:06:13 -04:00
Andrew Gallant
c5415adbe8
deps: update everything
This does unfortunately bring in both regex-syntax 0.6 and 0.7, but
we'll fix that once regex 1.9 is out.
2023-05-16 13:14:23 -04:00
Andrew Gallant
e593f5b7ee
grep-0.2.12 2023-05-16 13:12:45 -04:00
Andrew Gallant
fe97c0a152
ignore-0.4.20 2023-01-15 08:21:02 -05:00
Andrew Gallant
ca60fef4db
grep-0.2.11 2023-01-05 09:12:49 -05:00
Andrew Gallant
b80947a8b3
grep-printer-0.1.7 2023-01-05 09:11:16 -05:00
Andrew Gallant
120e55e7c7
grep-searcher-0.1.11 2023-01-05 09:07:09 -05:00
Andrew Gallant
96e130fbf9
grep-pcre2-0.1.6 2023-01-05 09:05:59 -05:00
Andrew Gallant
81529288cf
grep-regex-0.1.11 2023-01-05 09:02:55 -05:00
Andrew Gallant
bc78c644db
grep-matcher-0.1.6 2023-01-05 09:00:33 -05:00
Andrew Gallant
3224324e25
grep-cli-0.1.7 2023-01-05 08:57:31 -05:00
Andrew Gallant
a0e8dbe9df
ignore-0.4.19 2023-01-05 08:55:46 -05:00
Andrew Gallant
e95254a86f
deps: remove ignore's dependency on crossbeam-utils
Scoped threads are now part of std.
2023-01-05 08:51:08 -05:00
Andrew Gallant
364772ddd2
globset-0.4.10 2023-01-05 08:45:47 -05:00
Andrew Gallant
2e207833bc
deps: upgrade to jemallocator 0.5 2023-01-05 08:33:43 -05:00
Andrew Gallant
92b35a65f8
deps: upgrade to base64 0.20 2023-01-05 08:21:49 -05:00
Andrew Gallant
ac8fecbbf2
deps: upgrade bstr to 1.1 2023-01-05 08:21:15 -05:00
Andrew Gallant
8596817374
deps: do semver compatible upgrades 2023-01-05 08:16:32 -05:00
Andrew Gallant
28bff84a0a
deps: remove 'num_cpus'
Now that std:🧵:available_parallelism is a thing, we no longer
need num_cpus.
2023-01-05 08:15:09 -05:00
Andrew Gallant
13faa39b66
deps: update all dependencies within semver
Note that this adds a new dependency, 'unicode-ident', and removes
'unicode-xid'. I looked briefly at 'unicode-ident' and all looks okay.
It is also permissively licensed.
2022-12-20 09:23:29 -05:00
Andrew Gallant
7efa2e46d3
grep-0.2.10 2022-07-15 10:06:53 -04:00
Andrew Gallant
33b81cac48
grep-searcher-0.1.10 2022-07-15 10:05:46 -04:00
Andrew Gallant
b13d835d95
grep-0.2.9 2022-07-15 10:03:06 -04:00
Andrew Gallant
78a35d4d43
grep-searcher-0.1.9 2022-07-15 10:02:24 -04:00
Andrew Gallant
2cae30e399
grep-regex-0.1.10 2022-07-15 10:01:42 -04:00
Andrew Gallant
2cfb338530
globset-0.4.9 2022-06-10 14:10:34 -04:00
Andrew Gallant
985394a19e
deps: update to packed_simd_2 0.3.8
It broke on latest nightly. I'm *very* close to just removing the
'simd-accel' feature altogether.

Fixes #2230
2022-06-10 09:39:17 -04:00
Andrew Gallant
ced5b92aa9 deps: bump memmap2 to 0.5
Looking at the memmap2 CHANGELOG, there don't appear to be any breaking
changes that impact us.
2022-03-21 08:59:05 -04:00
Andrew Gallant
191315a2ea deps: update everything
Surprisingly looks like no new dependencies were added! Yay! And we
removed an extra copy of 'cfg-if' due to what appears to be an updated
in 'packed_simd_2'.

Otherwise, all updates appear to be minor things.
2022-03-21 08:59:05 -04:00
Andrew Gallant
caba5c4348
globset-0.4.8 2021-06-18 13:30:32 -04:00
Andrew Gallant
af6b6c543b
13.0.0 2021-06-12 08:12:24 -04:00
Andrew Gallant
1d53ed2744
grep-0.2.8 2021-06-12 08:08:32 -04:00
Andrew Gallant
57ce623a57
grep-printer-0.1.6 2021-06-12 08:07:46 -04:00
Andrew Gallant
dd47582619
grep-searcher-0.1.8 2021-06-12 08:06:58 -04:00
Andrew Gallant
6668d7ba8a
grep-pcre2-0.1.5 2021-06-12 08:06:29 -04:00
Andrew Gallant
7f3fd6f7ce
grep-regex-0.1.9 2021-06-12 08:03:56 -04:00
Andrew Gallant
cd4386bd9b
grep-matcher-0.1.5 2021-06-12 08:02:30 -04:00
Andrew Gallant
0cf2b98df2
grep-cli-0.1.6 2021-06-12 08:01:22 -04:00