summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
AgeCommit message (Collapse)Author
2018-02-11termcolor: release 0.3.4termcolor-0.3.4Andrew Gallant
2018-02-11grep: release 0.1.8grep-0.1.8Andrew Gallant
2018-02-10doc: overhaul documentationAndrew Gallant
This commit cleans up the README and splits portions of it out into a user guide (GUIDE.md) and a FAQ (FAQ.md). The README now provides a small list of documentation "quick" links to various parts of the docs. This commit also does a few other minor touchups.
2018-02-06argv: update clap to 2.29.4Andrew Gallant
We use the new AppSettings::AllArgsOverrideSelf to permit all flags to be specified multiple times. This removes the need for our previous work-around where we would enable `multiple` for every flag and then just extract the last value when consuming clap's matches. We also add a couple regression tests that ensure repeated switches and flags work as expected.
2018-02-04deps: remove vec-map feature from clapAndrew Gallant
This removes the vec-map feature from clap. clap's README claims that vec-map provides a small performance benefit, but I could observe any in ripgrep workloads. The benefit here is that it drops a dependency. Amazingly, this drops whole release build times for ripgrep from 68s to 33s, and debug build time also decreases from 22s to 15.5s. This was entirely unintentional but a welcome surprise.
2018-02-04logger: drop env_loggerAndrew Gallant
This commit updates the `log` crate to 0.4 and drops the dependency on env_logger. In particular, the latest version of env_logger brings in additional non-optional dependencies such as chrono that I don't think is worth including into ripgrep. It turns out ripgrep doesn't need any fancy logging. We just need a concept of log levels and the ability to print to stderr. Therefore, we just roll our own super simple logger. This update is motivated by the persistent configuration task. In particular, we need the ability to toggle the global log level more than once, and this doesn't appear to be possible with older versions of the log crate.
2018-02-01windows: fix OneDrive traversalsAndrew Gallant
This commit fixes a bug on Windows where directory traversals were completely broken when attempting to scan OneDrive directories that use the "file on demand" strategy. The specific problem was that Rust's standard library treats OneDrive directories as reparse points instead of directories, which causes methods like `FileType::is_file` and `FileType::is_dir` to always return false, even when retrieved via methods like `metadata` that purport to follow symbolic links. We fix this by peppering our code with checks on the underlying file attributes exposed by Windows. We consider an entry a directory if and only if the directory bit is set on the attributes. We are careful to make sure that the code remains the same on non-Windows platforms. Note that we also bump the dependency on `walkdir`, which contains a similar fix for its traversals. This bug is recorded upstream: https://github.com/rust-lang/rust/issues/46484 Upstream also has a pending PR: https://github.com/rust-lang/rust/pull/47956 Fixes #705
2018-01-30deps: update bytecountllogiq
This improves performance with current nightly rustc.
2018-01-30search: add support for searching compressed filesBalaji Sivaraman
This commit adds opt-in support for searching compressed files during recursive search. This behavior is only enabled when the `-z/--search-zip` flag is passed to ripgrep. When enabled, a limited set of common compression formats are recognized via file extension, and a new process is spawned to perform the decompression. ripgrep then searches the stdout of that spawned process. Closes #539
2018-01-09deps: update bytecount to 0.3Igor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-12-30deps: bump lazy_static to 1Igor Gnatenko
2017-12-30deps: update to latest regex crateAndrew Gallant
The regex update fixes the Rust nightly build failure by in turn updating its simd dependency to 2.x. The regex update also includes a literal optimization that uses Tuned Boyer Moore. Fixes #617
2017-12-19Speeding CI buildsLilian A. Moraru
2017-11-22bump bytecount to 0.2Igor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-11-22Update to memmap 0.6Dan Burkert
`memmap` 0.6.0 introduces major API changes in anticipation of a 1.0 release. See https://github.com/danburkert/memmap-rs/releases/tag/0.6.0 for more information. CC danburkert/memmap-rs#33.
2017-10-22cargo: bump to 0.7.10.7.1Andrew Gallant
2017-10-22deps: bump ignore to 0.3.1Andrew Gallant
2017-10-21cargo: bump to 0.7.0ignore-0.3.0grep-0.1.7globset-0.2.10.7.0Andrew Gallant
2017-10-21ignore: upgrade to walkdir 2Andrew Gallant
The uninteresting bits of this commit involve mechanical changes for updates to walkdir 2. The more interesting bits of this commit are the breaking changes, although none of them should require any significant change on users of this library. The breaking changes are as follows: * `DirEntry::path_is_symbolic_link` has been renamed to `DirEntry::path_is_symlink`. This matches the conventions in the standard library, and also the corresponding name change in walkdir. * Removed the `From<walkdir::Error> for ignore::Error` impl. This was intended to only be used internally, but was the only thing that made `walkdir` a public dependency of `ignore`. Therefore, we remove it since it seems unnecessary. * Renamed `WalkBuilder::sort_by` to `WalkBuilder::sort_by_file_name`, and changed the type of the comparator from Fn(&OsString, &OsString) -> cmp::Ordering + 'static to Fn(&OsStr, &OsStr) -> cmp::Ordering + Send + Sync + 'static The corresponding change in `walkdir` retains the `sort_by` name, but gives the comparator a pair of `&DirEntry` values instead of a pair of `&OsStr` values. Ideally, `ignore` would hand off its own pair of `&ignore::DirEntry` values, but this requires more design work. So for now, we retain previous functionality, but leave room to make a proper `sort_by` method. [breaking-change]
2017-10-21deps: upgrade to memchr 2Andrew Gallant
2017-10-21style: 80 colsAndrew Gallant
2017-08-28Update encoding_rs to 0.7.0Henri Sivonen
2017-08-27restore the default SIGPIPE behavior as a temporary workaroundJack O'Connor
See https://github.com/BurntSushi/ripgrep/issues/200.
2017-08-230.6.0Andrew Gallant
2017-08-23cargo: add crates.io badgesAndrew Gallant
2017-08-23bump depsAndrew Gallant
2017-08-20Pass the simd-accel feature to encoding_rsHenri Sivonen
2017-08-08Remove unused libc dependencyVurich
2017-07-30bump encoding_rs to 0.6Igor Gnatenko
2017-07-17ignore-0.2.2ignore-0.2.2Andrew Gallant
2017-07-12bump ignore versionAndrew Gallant
2017-05-11bump ripgrep, ignore, globset0.5.2Andrew Gallant
The `ignore` and `globset` crates both got breaking changes in the course of fixing #444, so increase 0.x to 0.(x+1).
2017-05-08deps: update clap to 2.24Andrew Gallant
Fixes #442
2017-04-090.5.10.5.1Andrew Gallant
2017-04-09bump ignoreignore-0.1.9Andrew Gallant
2017-04-05updates clap and removes home rolled -h/--help distinctionKevin K
This commit updates clap to v2.23.0 The update contained a bug fix in clap that results in broken code in ripgrep. ripgrep was relying on the bug, but this commit fixes that issue. The bug centered around not being able to override the auto-generated help message by supplying a flag with a long of `help`. Normally, supplying a flag with a long of `help` means whenever the user passes `--help`, the consuming code (e.g. ripgrep) is responsible for displaying the help message. However, due to the bug in clap this wasn't necessary for ripgrep to do unless the user passed `-h`. With the bug fixed, it meant the user passing `--help` and clap expected ripgrep to display the help, yet ripgrep expected clap to display the help. This has been fixed in this commit of ripgrep. All well now! v2.23.0 also brings the abilty to use `Arg::help` or `Arg::long_help` allowing one to distinguish between `-h` and `--help`. This commit leaves all doc strings in the `lazy_static!` hashmap however only for aesthetic reasons. This means all home rolled handling of `-h`/`--help` has been removed from ripgrep, yet functionality *and* appearances are 100% the same.
2017-03-120.5.0Andrew Gallant
2017-03-12Add support for additional text encodings.Andrew Gallant
This includes, but is not limited to, UTF-16, latin-1, GBK, EUC-JP and Shift_JIS. (Courtesy of the `encoding_rs` crate.) Specifically, this feature enables ripgrep to search files that are encoded in an encoding other than UTF-8. The list of available encodings is tied directly to what the `encoding_rs` crate supports, which is in turn tied to the Encoding Standard. The full list of available encodings can be found here: https://encoding.spec.whatwg.org/#concept-encoding-get This pull request also introduces the notion that text encodings can be automatically detected on a best effort basis. Currently, the only support for this is checking for a UTF-16 bom. In all other cases, a text encoding of `auto` (the default) implies a UTF-8 or ASCII compatible source encoding. When a text encoding is otherwise specified, it is unconditionally used for all files searched. Since ripgrep's regex engine is fundamentally built on top of UTF-8, this feature works by transcoding the files to be searched from their source encoding to UTF-8. This transcoding only happens when: 1. `auto` is specified and a non-UTF-8 encoding is detected. 2. A specific encoding is given by end users (including UTF-8). When transcoding occurs, errors are handled by automatically inserting the Unicode replacement character. In this case, ripgrep's output is guaranteed to be valid UTF-8 (excluding non-UTF-8 file paths, if they are printed). In all other cases, the source text is searched directly, which implies an assumption that it is at least ASCII compatible, but where UTF-8 is most useful. In this scenario, encoding errors are not detected. In this case, ripgrep's output will match the input exactly, byte-for-byte. This design may not be optimal in all cases, but it has some advantages: 1. In the happy path ("UTF-8 everywhere") remains happy. I have not been able to witness any performance regressions. 2. In the non-UTF-8 path, implementation complexity is kept relatively low. The cost here is transcoding itself. A potentially superior implementation might build decoding of any encoding into the regex engine itself. In particular, the fundamental problem with transcoding everything first is that literal optimizations are nearly negated. Future work should entail improving the user experience. For example, we might want to auto-detect more text encodings. A more elaborate UX experience might permit end users to specify multiple text encodings, although this seems hard to pull off in an ergonomic way. Fixes #1
2017-03-08Remove regex build-dependency in Cargo.tomlMarc Tiehuis
2017-03-08Add `--max-filesize` option to clitiehuis
The --max-filesize option allows filtering files which are larger than the specified limit. This is potentially useful if one is attempting to search a number of large files without common file-types/suffixes. See #369.
2017-02-25bump clap to 2.20.5Andrew Gallant
Fixes #383
2017-02-25update env_logger to 0.4Igor Gnatenko
2017-02-18update termcolor depAndrew Gallant
2017-02-18Remove Windows deps from ripgrep proper.Andrew Gallant
All Windows specific code has been (mostly) pushed out of ripgrep and into its constituent libraries.
2017-01-21Add 'text-processing' category.Andrew Gallant
2017-01-20 Add categories to Cargo.tomlJake Goulding
2017-01-15Replace internal atty module with atty crate.Andrew Gallant
This removes all use of explicit unsafe in ripgrep proper except for one: accessing the contents of a memory map. (Which may never go away.)
2017-01-130.4.00.4.0Andrew Gallant
2017-01-09Don't search stdout redirected file.Andrew Gallant
When running ripgrep like this: rg foo > output we must be careful not to search `output` since ripgrep is actively writing to it. Searching it can cause massive blowups where the file grows without bound. While this is conceptually easy to fix (check the inode of the redirection and the inode of the file you're about to search), there are a few problems with it. First, inodes are a Unix thing, so we need a Windows specific solution to this as well. To resolve this concern, I created a new crate, `same-file`, which provides a cross platform abstraction. Second, stat'ing every file is costly. This is not avoidable on Windows, but on Unix, we can get the inode number directly from directory traversal. However, this information wasn't exposed, but now it is (through both the ignore and walkdir crates). Fixes #286
2017-01-01Update to regex 0.2.Andrew Gallant