Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(lib): use ripgrep instead of git grep #7849

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

marienz
Copy link
Contributor

@marienz marienz commented Apr 26, 2024

Although this is a refactor for normal users of Doom, it is a bugfix for one (I assume) unsupported configuration: when Doom is not running from a git checkout. In that case, doom--help-package-configs currently returns Git's error messages. This breaks doom/help-packages because it expects each returned line to contain at least one : character, so it errors out with Wrong number of arguments: (file line _match &rest), 2.

Using ripgrep here should be equivalent for normal users as long as they have not added untracked files not covered by Doom's .gitignore.

Assuming Doom outside of a git checkout is indeed unsupported, please close this PR if you don't want to spend time on it: when I saw the TODO in that function I figured I'd send this in, but it shouldn't be too hard to work around locally.

(I'm running into this running Doom from the Nix store. So far, this is the only issue I've encountered doing so. I've tested this change with that setup and with a more normal Doom install.)


Although this is a refactor for normal users of Doom, it is a bugfix for
one (I assume) unsupported configuration: when Doom is not running from
a git checkout. In that case, `doom--help-package-configs` currently
returns Git's error messages. This breaks `doom/help-packages` because
it expects each returned line to contain at least one `:` character, so
it errors out with `Wrong number of arguments: (file line _match &rest),
2`.

Using ripgrep here should be equivalent for normal users as long as they
have not added untracked files not covered by Doom's .gitignore.
@marienz marienz requested a review from a team as a code owner April 26, 2024 06:14
@hlissner hlissner added is:refactor Code changes with little/no effect on user-facing behavior module:core:lib Relevant to Doom core's libraries labels Jun 3, 2024
@hlissner hlissner added this to the modules v24.06 milestone Jun 3, 2024
@hlissner hlissner merged commit e203309 into doomemacs:master Jun 3, 2024
@hlissner
Copy link
Member

hlissner commented Jun 3, 2024

This is precisely what I'd wanted to do, but never got around to, so it's a welcome change. Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:refactor Code changes with little/no effect on user-facing behavior module:core:lib Relevant to Doom core's libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants