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

374 Commits

Author SHA1 Message Date
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
Andrew Gallant
14860b0f16
ignore-0.4.18 2021-06-12 07:59:07 -04:00
Andrew Gallant
5631e5c7a0
globset-0.4.7 2021-06-12 07:56:56 -04:00
Andrew Gallant
0ee85a89f5
deps: update to memmap2
Looking at the changelog for memmap2, the only breaking change was to
MmapOptions, which we don't use. So no migration is needed.
2021-06-12 07:53:42 -04:00
Andrew Gallant
ed9d37959f
deps: updates libc and syn 2021-06-12 07:52:04 -04:00
Andrew Gallant
35c5db6d1a deps: update everything
Removes two dependencies! autocfg and byteorder.
2021-06-01 21:07:37 -04:00
Andrew Gallant
e824531e38 edition: manual changes
This is mostly just about removing 'extern crate' everywhere and fixing
the fallout.
2021-06-01 21:07:37 -04:00
Andrew Gallant
3f4c4188c1
deps: update to regex 1.5.2
This brings in a performance bug fix, merged in
https://github.com/rust-lang/regex/pull/768.

Fixes #1860.
2021-05-01 07:44:47 -04:00
Andrew Gallant
ce4b587055
deps: update everything
It looks like no new dependencies have been introduced. Yay!

This update was primarily motivated to bring regex 1.5 in with its new
memmem implementation from the memchr crate.
2021-04-30 20:26:32 -04:00
Andrew Gallant
c7730d1f3a
deps: bump regex and regex-syntax 2021-03-11 21:20:25 -05:00
Andrew Gallant
7899a4b931
regex: s/CachedThreadLocal/ThreadLocal
CachedThreadLocal has been deprecated. We bump thread_local's minimal
version corresponding to that deprecation as well.
2021-01-25 10:38:05 -05:00
Andrew Gallant
ae55a4e872
deps: update everything
Most of these updates come from releases I've made, and the rest appear
minor. No new dependencies have been added, and `const_fn` was removed.
Yay.
2021-01-17 18:55:17 -05:00
Andrew Gallant
3a1780d841
deps: replace memmap with memmap2
memmap is unmaintained at this point and it is being flagged as a
RUSTSEC advisory in ripgrep. This doesn't seem like that big of a deal
to me honestly, but memmap2 looks like a fine choice at this point.

Fixes #1785, Closes #1786
2021-01-17 18:49:51 -05:00
Andrew Gallant
a6d05475fb
ignore-0.4.17 2020-11-23 10:25:33 -05:00
Andrew Gallant
810be0b348 deps: update base64 to 0.13.0 2020-11-02 10:52:51 -05:00
Andrew Gallant
a28bb1e953 deps: bring in all semver updates
This brings in all other semver updates.

This did require updating some tests, since bstr changed its debug
output for NUL bytes to be a bit more idiomatic.
2020-11-02 10:52:51 -05:00
Andrew Gallant
3ef63dacbe deps: targeted update of some dependencies
This updates encoding_rs, crossbeam-utils and crossbeam-channel. This
serves two purposes. The encoding_rs update fixes a compilation failure
on the latest nightly. The crossbeam updates are good sense and to
reduce duplicate dependencies such as cfg-if. (Although, we note that
the log crate still pulls in cfg-if 0.1, so ripgrep has a duplicate
dependency there for now. But it's very small.)

Fixes #1721, Closes #1705
2020-11-02 10:52:51 -05:00
Andrew Gallant
c777e2cd57
globset-0.4.6 2020-10-21 21:10:43 -04:00
Andrew Gallant
11c7b2ae17
deps: upgrade pcre2-sys to 0.2.5
This brings in a PR that disables the JIT on certain Apple targets since
it doesn't appear to build.

See: https://github.com/BurntSushi/rust-pcre2/pull/16
2020-08-27 09:37:53 -04:00
Andrew Gallant
ac7d4c99b9
deps: bump pcre2-sys again
The pcre2-sys 0.2.3 release was bunk, since it didn't include the PCRE2
source for some reason.
2020-08-19 19:03:50 -04:00
Andrew Gallant
b5681e3694
deps: bump pcre2-sys
This should bring a compilation time improvement when building static
buils of PCRE2 by enabling parallelism for C compilation.

Kudos to @JoshTriplett for the tip!
2020-08-19 18:55:16 -04:00
Andrew Gallant
7cb211378a
12.1.1 2020-05-29 09:26:47 -04:00
Andrew Gallant
f97cc623f7
grep-0.2.7 2020-05-29 09:17:24 -04:00
Andrew Gallant
c9bb78ceba
grep-cli-0.1.5 2020-05-29 09:14:18 -04:00
Andrew Gallant
72bdde6771
ignore-0.4.16 2020-05-29 09:13:02 -04:00
Andrew Gallant
d66712a452
deps: update all dependencies 2020-05-29 09:11:50 -04:00
Andrew Gallant
2658bd4e46
12.1.0 2020-05-09 11:13:33 -04:00
Andrew Gallant
08dee094dd
grep-0.2.6 2020-05-09 10:37:29 -04:00
Andrew Gallant
c5d6141562
grep-printer-0.1.5 2020-05-09 10:33:02 -04:00
Andrew Gallant
c0f0492b98
grep-regex-0.1.8 2020-05-09 10:31:29 -04:00
Andrew Gallant
568018386b
ignore-0.4.15 2020-05-09 10:27:19 -04:00
Andrew Gallant
b458cf39f2
deps: update to base64 0.12
No code changes were necessary.
2020-05-09 10:25:37 -04:00
Andrew Gallant
3fd2694fbc
deps: update all dependencies
Everything looks pretty minor.
2020-05-09 09:05:51 -04:00
Andrew Gallant
73103df6d9
deps: small dependency updates 2020-04-18 11:33:27 -04:00
Andrew Gallant
1d5b1011e5
12.0.1 2020-03-29 18:59:40 -04:00
Andrew Gallant
09a4b75baf
ignore-0.4.14 2020-03-29 18:49:01 -04:00
Andrew Gallant
b9bb04b793
deps: minor dependency updates 2020-03-29 18:47:15 -04:00
Andrew Gallant
67c0f576b6
ignore-0.4.13 2020-03-22 21:08:37 -04:00
Andrew Gallant
543f99dbf1
grep-regex-0.1.7 2020-03-22 21:08:19 -04:00
Andrew Gallant
92daa34eb3
ripgrep: release 12.0.0 2020-03-15 21:42:54 -04:00
Andrew Gallant
7340d8dbbe
deps: update everything
This adds one new dependency, maybe-uninit, which is brought in by
crossbeam-channel[1]. This is to apparently fix some unsound code
without bumping the MSRV. Since ripgrep uses the latest stable release
of Rust, the maybe-uninit crate should compile down to nothing and just
re-export std's `MaybeUninit` type.

[1] - https://github.com/crossbeam-rs/crossbeam/pull/458
2020-03-15 08:32:33 -04:00
Lucien Greathouse
db7a8cdcb5
globset: Implement serde::{Serialize, Deserialize} for Glob
PR #1492
2020-02-21 07:40:47 -05:00
Andrew Gallant
fab5c812f3 tests: add debugging output
The transient failures appear to be persisting and they are quite
difficult to debug. So include a full directory listing in the output of
every test failure.
2020-02-20 16:07:51 -05:00
Ed Page
9f7c2ebc09 ignore: allow parallel walker to borrow data
This makes it so the caller can more easily refactor from
single-threaded to multi-threaded walking. If they want to support both,
this makes it easier to do so with a single initialization code-path. In
particular, it side-steps the need to put everything into an `Arc`.

This is not a breaking change because it strictly increases the number
of allowed inputs to `WalkParallel::run`.

Closes #1410, Closes #1432
2020-02-17 17:16:28 -05:00
Andrew Gallant
cd8ec38a68 grep-regex: add fast path for -w/--word-regexp
Previously, ripgrep would always defer to the regex engine's capturing
matches in order to implement word matching. Namely, ripgrep would
determine the correct match offsets via a capturing group, since the
word regex is itself generated from the user supplied regex.

Unfortunately, the regex engine's capturing mode is still fairly slow,
so this commit adds a fast path to avoid capturing mode in the vast
majority of cases. See comments in the code for details.
2020-02-17 17:16:28 -05:00
Ximin Luo
f8418c6a52 explicitly declare lazy_static dependency
`benches/bench.rs` uses lazy_static but Cargo.toml does not declare a
dependency on it. This causes rustc to use its own internal private
copy instead. Sometimes this causes unintuitive errors like this Debian
bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942243

The underlying issue is https://github.com/rust-lang/rust#27812 but it
can be avoided by explicitly declaring the dependency, which you are
supposed to do anyways.

Closes #1435
2020-02-17 17:16:28 -05:00
Andrew Gallant
74d1fe59e9
deps: update everything 2020-01-30 18:33:40 -05:00
Andrew Gallant
9fd1e202e0
deps: update regex, regex-syntax and aho-corasick
Notably, this brings in a bug fix reported by @okdana:
https://github.com/rust-lang/regex/issues/640
2020-01-30 18:32:56 -05:00
Andrew Gallant
8bdf84e3a8
deps: update everything 2020-01-16 19:47:23 -05:00
Andrew Gallant
5a6e17fcc1
deps: various updates
Most of these updates (sans thread_local) are from crates I maintain
that have seen updates recently.

Notably, this includes a bump to `termcolor 1.1.0` which includes
support for respecting `NO_COLOR`. This commit therefore means that
ripgrep now supports `NO_COLOR`.

As an added bonus, we drop a dependency on Windows. (Although the total
amount of code compiled remains the same.)

Closes #1186
2020-01-11 10:09:10 -05:00
Andrew Gallant
00bfcd14a6
ignore-0.4.11 2020-01-10 15:08:27 -05:00
Andrew Gallant
837fb5e21f deps: update to crossbeam-channel 0.4
Closes #1427
2020-01-10 15:07:47 -05:00
Andrew Gallant
2e1815606e deps: update to bytecount 0.6
Looks like there aren't any major changes other than dependency updates.
2020-01-10 15:07:47 -05:00
Andrew Gallant
cb2f6ddc61 deps: update to thread_local 1.0
We also update the pcre2 and regex dependencies, which removes any other
lingering uses of thread_local 0.3.
2020-01-10 15:07:47 -05:00
Andrew Gallant
bd7a42602f deps: bump to base64 0.11 2020-01-10 15:07:47 -05:00
Andrew Gallant
528ce56e1b deps: run cargo update
The only new dependency is an unused target specific dependency hermit
via the atty crate.
2020-01-10 15:07:47 -05:00
Andrew Gallant
e14f9195e5
deps: update everything 2019-08-28 20:18:47 -04:00
Andrew Gallant
ef0e7af56a
deps: update bstr to 0.2.7
The new bstr release contains a small performance bug fix where some
trivial methods weren't being inlined.
2019-08-11 10:41:05 -04:00
Andrew Gallant
5c4584aa7c
grep-regex-0.1.5 2019-08-06 09:51:13 -04:00
Andrew Gallant
0972c6e7c7
grep-searcher-0.1.6 2019-08-06 09:50:52 -04:00
Andrew Gallant
0a372bf2e4
deps: update ignore 2019-08-06 09:50:35 -04:00
Andrew Gallant
31807f805a
deps: drop tempfile
We were only using it to create temporary directories for `ignore`
tests, but it pulls in a bunch of dependencies and we don't really need
randomness. So just use our own simple wrapper instead.
2019-08-06 09:46:05 -04:00
Andrew Gallant
4de227fd9a
deps: update everything
Mostly this just updates regex and its assorted dependencies. This does
drop utf8-ranges and ucd-util, in accordance with changes to
regex-syntax and regex.
2019-08-05 13:50:55 -04:00
Andrew Gallant
e402d6c260
ripgrep: release 11.0.2 2019-08-01 18:02:15 -04:00
Andrew Gallant
709ca91f50
ignore: release 0.4.9 2019-08-01 17:48:37 -04:00
Andrew Gallant
9c220f9a9b
grep-regex: release 0.1.4 2019-08-01 17:47:45 -04:00
Andrew Gallant
9085bed139
grep-matcher: release 0.1.3 2019-08-01 17:46:59 -04:00
Andrew Gallant
b5e5979ff1
deps: update everything
This drops `spin` and `autocfg`, yay.
2019-08-01 17:42:38 -04:00
Andrew Gallant
08ae4da2b7
deps: update them
There are some nice removals. It looks like rand has slimmed down, and
smallvec is gone now as well.
2019-07-25 07:52:33 -04:00
Andrew Gallant
7ac95c1f50
deps: bump ignore 2019-07-24 12:56:47 -04:00
Andrew Gallant
785c1f1766
release: globset, grep-cli, grep-printer, grep-searcher 2019-06-26 16:53:30 -04:00
Andrew Gallant
8b734cb490
deps: update everything 2019-06-26 16:51:06 -04:00
Andrew Gallant
b93762ea7a
bstr: update everything to bstr 0.2 2019-06-26 16:47:33 -04:00
Andrew Gallant
50bcb7409e
deps: update everything 2019-06-16 18:38:45 -04:00
Andrew Gallant
9dcfd9a205 deps: bump pcre2-sys to 0.2.1
This brings in a bug fix that no longer tries to run `git` to update the
submodule if the `git` command doesn't exist.

This is useful is more restricted build contexts where `git` isn't
installed. Such as in the docker image used for running `cross`.
2019-04-25 11:12:14 -04:00
Andrew Gallant
03bf37ff4a
alloc: use jemalloc when building with musl
It turns out that musl's allocator is slow enough to cause a fairly
noticeable performance regression when ripgrep is built as a static
binary with musl. We fix this by using jemalloc when building with musl.

We continue to use the default system allocator in all other scenarios.
Namely, glibc's allocator doesn't noticeably regress performance compared
to jemalloc. But we could add more targets to this logic if other
system allocators (macOS, Windows) prove to be slow.

This wasn't necessary before because rustc recently stopped using jemalloc
by default.

Fixes #1268
2019-04-24 17:21:38 -04:00
Andrew Gallant
973de50c9e
ripgrep: release 11.0.1, take 2 2019-04-16 13:11:28 -04:00
Andrew Gallant
fdde2bcd38
deps: update regex to 1.1.6
This brings in a fix for a regression introduced in ripgrep 11.

Fixes #1247
2019-04-16 08:34:30 -04:00
Andrew Gallant
d7f57d9aab
ripgrep: release 11.0.0 2019-04-15 18:09:40 -04:00
Andrew Gallant
1a2a24ea74
grep: release 0.2.4 2019-04-15 18:03:46 -04:00
Andrew Gallant
d66610b295
grep-cli: release 0.1.2 2019-04-15 18:02:44 -04:00
Andrew Gallant
019ae1989b
grep-printer: release 0.1.2 2019-04-15 18:00:49 -04:00
Andrew Gallant
36d3f235dc
grep-searcher: release 0.1.4 2019-04-15 17:59:22 -04:00
Andrew Gallant
79018eb693
grep-pcre2: release 0.1.3 2019-04-15 17:57:03 -04:00
Andrew Gallant
44cd344438
grep-regex: release 0.1.3 2019-04-15 17:56:04 -04:00
Andrew Gallant
e493e54b9b
grep-matcher: release 0.1.2 2019-04-15 17:53:29 -04:00
Andrew Gallant
8e8215aa65
ignore: release 0.4.7 2019-04-15 17:50:37 -04:00
Andrew Gallant
e79085e9e4
release: globset 0.4.3 2019-04-15 14:07:03 -04:00
Andrew Gallant
9952ba2068 deps: update glob dev-dependency 2019-04-14 19:29:27 -04:00
Andrew Gallant
b751758d60 deps: update everything 2019-04-14 19:29:27 -04:00
Andrew Gallant
f3646242cc deps: use pcre2 0.2.0
This comes with PCRE 10.32 and a few new options we'll use in subsequent
commits.
2019-04-14 19:29:27 -04:00
Andrew Gallant
09108b7fda regex: make multi-literal searcher faster
This makes the case of searching for a dictionary of a very large number
of literals much much faster. (~10x or so.) In particular, we achieve this
by short-circuiting the construction of a full regex when we know we have
a simple alternation of literals. Building the regex for a large dictionary
(>100,000 literals) turns out to be quite slow, even if it internally will
dispatch to Aho-Corasick.

Even that isn't quite enough. It turns out that even *parsing* such a regex
is quite slow. So when the -F/--fixed-strings flag is set, we short
circuit regex parsing completely and jump straight to Aho-Corasick.

We aren't quite as fast as GNU grep here, but it's much closer (less than
2x slower).

In general, this is somewhat of a hack. In particular, it seems plausible
that this optimization could be implemented entirely in the regex engine.
Unfortunately, the regex engine's internals are just not amenable to this
at all, so it would require a larger refactoring effort. For now, it's
good enough to add this fairly simple hack at a higher level.

Unfortunately, if you don't pass -F/--fixed-strings, then ripgrep will
be slower, because of the aforementioned missing optimization. Moreover,
passing flags like `-i` or `-S` will cause ripgrep to abandon this
optimization and fall back to something potentially much slower. Again,
this fix really needs to happen inside the regex engine, although we
might be able to special case -i when the input literals are pure ASCII
via Aho-Corasick's `ascii_case_insensitive`.

Fixes #497, Fixes #838
2019-04-07 19:11:03 -04:00
Andrew Gallant
743d64f2e4 deps: update to clap 2.33 2019-04-06 10:35:08 -04:00
lesnyrumcajs
5962abc465 searcher: add option to disable BOM sniffing
This commit adds a new encoding feature where the -E/--encoding flag
will now accept a value of 'none'. When given this value, all encoding
related machinery is disabled and ripgrep will search the raw bytes of
the file, including the BOM if it's present.

Closes #1207, Closes #1208
2019-04-06 10:35:08 -04:00
Andrew Gallant
77439f99a4 deps: add bstr to Cargo.lock 2019-04-05 23:24:08 -04:00