1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-25 14:22:54 +02:00
Commit Graph

1991 Commits

Author SHA1 Message Date
bdf01f46a6 changelog: start next section 2024-01-06 14:41:45 -05:00
1c775f3a82 pkg/brew: update tap 2024-01-06 14:41:09 -05:00
e50df40a19 14.1.0 14.1.0 2024-01-06 14:32:27 -05:00
1fa76d2a42 changelog: add 14.1.0 blurb 2024-01-06 14:31:16 -05:00
44aa5a417d deps: bump ignore to 0.4.22 2024-01-06 14:28:28 -05:00
2c3897585d ignore-0.4.22 ignore-0.4.22 2024-01-06 14:27:44 -05:00
6e9141a9ca deps: update everything 2024-01-06 14:26:52 -05:00
c8e4a84519 cli: prefix all non-fatal error messages with 'rg: '
Fixes #2694
2024-01-06 14:15:52 -05:00
f02a50a69d changelog: various updates 2024-01-06 13:59:52 -05:00
b9c774937f ignore: fix reference cycle for compiled matchers
It looks like there is a reference cycle caused by the compiled
matchers (compiled HashMap holds ref to Ignore and Ignore holds ref
to HashMap). Using weak refs fixes issue #2690 in my test project.
Also confirmed via before and after when profiling the code, see the
attached screenshots in #2692.

Fixes #2690
2024-01-06 12:50:42 -05:00
67dd809a80 ignore: add some 'allow(dead_code)' annotations
I don't usually like doing this and would prefer to just delete unused
code, but I don't have the context required to understand why this code
is unused. A refresh of this crate is on the (distant) horizon, so I'll
just leave these here for now to squash the warnings.
2024-01-06 12:25:06 -05:00
e0a85678e1 complete/fish: improve shell completions for fish
- Stop using `-n __fish_use_subcommand`. This had the effect of
ignoring options if a positional argument has already been given, but
that's not how ripgrep works.

- Only suggest negation options if the option they're negating is
passed (e.g., only complete `--no-pcre2` if `--pcre2` is present). The
zsh completions already do this.

- Take into account whether an option takes an argument. If an option
is not a switch then it won't suggest further options until the
argument is given, e.g. `-C<tab>` won't suggest options but `-i<tab>`
will.

- Suggest correct arguments for options. We already completed a fixed
set of choices where available, but now we go further:

  - Filenames are only suggested for options that take filenames.

  - `--pre` and `--hostname-bin` suggest binaries from `$PATH`.

  - `-t`/`--type`/&c use `--type-list` for suggestions, like in zsh,
  with a preview of the glob patterns.

  - `--encoding` uses a hardcoded list extracted from the zsh
  completions. This has been refactored into a separate file, and the
  range globs (`{1..5}`) replaced by comma globs (`{1,2,3,4,5}`) since
  those work in both shells. I verified that this produces the same
  list as before in zsh, and the same list in fish (albeit in a
  different order).

PR #2684
2024-01-06 10:39:35 -05:00
23af5fb043 doc: update MSRV in README
PR #2673
2024-01-06 10:22:26 -05:00
5dec4b8e37 ci: drop custom Cross images
It looks like these aren't needed any more? I'm not sure why to be
honest. I suspect it's because we no longer need asciidoc(tor)? to
generate man pages. And I believe tests that require things like `zstd`
are automatically if `zstd` isn't installed.
2024-01-06 10:21:34 -05:00
827082a33a ci: add more ARM build configurations to CI and release workflows
... it turns out that rustembedded/cross:armv7-unknown-linux-musleabi
doesn't exist. And looking more closely, it looks like the Cross project
has decided to shake things up and publish images to ghcr instead. So we
migrate everything over to that.
2024-01-06 10:21:34 -05:00
6c2a550e1e deps: update everything
This drops a dependency on memoffset due to a crossbeam-epoch update.
w00t.
2024-01-04 19:46:29 -05:00
8e8fc9c503 deps: bump pcre2-sys to 0.2.8
This release contains some extra logic to disable the JIT on musleabi
targets.
2024-01-04 19:44:28 -05:00
2057023dc5 readme: update benchmarks
We add a few more too.
2024-01-03 16:21:04 -05:00
3f2fe0afee deps: update everything
This also drops a dependency on scopeguard, courtesy of crossbeam-epoch
dropping it. Not sure why they did, but fine by me.
2023-12-17 09:37:33 -05:00
56c7ad175a ignore/types: add Lean
Ref: https://lean-lang.org/

PR #2678
2023-12-07 11:46:00 -05:00
5b7a30846f doc: fix Guix install instructions
`guix install` should not be run using `sudo`, as per
<https://packages.guix.gnu.org/packages/ripgrep/>.

PR #2669
2023-11-30 10:54:54 -05:00
2a4dba3fbf ignore/types: add meson.options
Starting with meson 1.1, there is a preference for using meson.options
instead of meson_options.txt.  Add the new filename to the meson set.

PR #2666
2023-11-29 19:03:12 -05:00
84d65865e6 doc: add Void Linux installation instructions
PR #2665
2023-11-29 07:49:20 -05:00
d9aaa11873 pkg/brew: update tap 2023-11-28 16:23:16 -05:00
67ad9917ad 14.0.3 14.0.3 2023-11-28 16:18:14 -05:00
daa157b5f9 core: actually implement --sortr=path
This is an embarrassing oversight. A `todo!()` actually made its way
into a release! Oof.

This was working in ripgrep 13, but I had redone some aspects of sorting
and this just got left undone.

Fixes #2664
2023-11-28 16:17:14 -05:00
ca5e294ad6 pkg/brew: update tap 2023-11-27 21:44:06 -05:00
6c7947b819 14.0.2 14.0.2 2023-11-27 21:38:21 -05:00
9acb4a5405 deps: bump grep to 0.3.1 2023-11-27 21:37:41 -05:00
0096c74c11 grep-0.3.1 grep-0.3.1 2023-11-27 21:36:54 -05:00
8c48355b03 deps: bump grep-printer to 0.2.1 2023-11-27 21:36:44 -05:00
f9b86de963 grep-printer-0.2.1 grep-printer-0.2.1 2023-11-27 21:36:02 -05:00
d23b74975a deps: bump grep-searcher to 0.1.13 2023-11-27 21:35:53 -05:00
a5cbdb3dfe grep-searcher-0.1.13 grep-searcher-0.1.13 2023-11-27 21:34:58 -05:00
b6bac8484e cargo: add release-lto profile
The idea is to build ripgrep with as much optimization as possible.

This makes compilation times absolutely obscene. They jump from <10
seconds to 30+ seconds on my i9-12900K. I don't even want to know how
long CI would take with these.

I tried some ad hoc benchmarks and could not notice any meaningful
improvement with the LTO binary versus the normal release profile.
Because of that, I still don't think it's worth bloating the release
cycle times.

Ref #1225
2023-11-27 21:31:03 -05:00
805fa32d18 searcher: work around NUL line terminator bug
As the FIXME comment says, ripgrep is not yet using the new line
terminator option in regex-automata exposed for exactly this purpose.
Because of that, line anchors like `(?m:^)` and `(?m:$)` will only match
`\n` as a line terminator. This means that when --null-data is used in
combination with --line-regexp, the anchors inserted by --line-regexp
will not match correctly. This is only a big deal in the "fast" path,
which requires the regex engine to deal with line terminators itself
correctly. The slow path strips line terminators regardless of what they
are, and so the line anchors can match (begin/end of haystack).

Fixes #2658
2023-11-27 21:17:12 -05:00
2d518dd1f9 release: tweak how sha256sum is invoked
The output would ideally just have the basename of the file and not a
meaningless relative path.

Fixes #2654
2023-11-27 21:17:12 -05:00
8575d26179 complete/fish: Fix syntax for negated options
And also, negated options don't take arguments.

Specifically, the fish completion generator currently forgets to add
`-l` to negation options, leading to a list of these errors:

    complete: too many arguments

    ~/.config/fish/completions/rg.fish (line 146):
    complete -c rg -n '__fish_use_subcommand'  no-sort-files -d '(DEPRECATED) Sort results by file path.'
    ^
    from sourcing file ~/.config/fish/completions/rg.fish

    (Type 'help complete' for related documentation)

To reproduce, run `fish -c 'rg --generate=complete-fish | source'`.

It also potentially suggests a list of choices for negation options,
even though those never take arguments. That case doesn't occur with
any of the current options but it's an easy fix.

Fixes #2659, Closes #2655
2023-11-27 21:17:12 -05:00
2e81a7adfe doc: fix typo that was preventing interpolation
Closes #2662
2023-11-27 21:17:12 -05:00
cd5440fb62 changelog: fix wording
Ref: https://news.ycombinator.com/item?id=38425790
2023-11-26 17:58:30 -05:00
2ee690e87a pkg/brew: update tap 2023-11-26 17:37:52 -05:00
59f86a45d3 14.0.1 14.0.1 2023-11-26 16:33:35 -05:00
2d31af38a2 cargo: include pkg/windows in crate package
Fixes #2653
2023-11-26 16:32:59 -05:00
0da1176e7d pkg/brew: update tap 2023-11-26 15:27:09 -05:00
eeffcd50b7 doc: add step to run 'cargo package' 2023-11-26 15:25:23 -05:00
625743d7c8 grep-0.3.0 grep-0.3.0 2023-11-26 15:24:09 -05:00
3d0171040a grep-printer-0.2.0 grep-printer-0.2.0 2023-11-26 15:21:40 -05:00
93429d0f85 14.0.0 14.0.0 2023-11-26 14:19:31 -05:00
9c4b0baf10 deps: bump grep to 0.2.13 2023-11-26 14:18:53 -05:00
179487aaed grep-0.2.13 grep-0.2.13 2023-11-26 14:18:17 -05:00