Skip to content

git grep operations are failing on macOS - update docs and tests #490

@pierre-rouleau

Description

@pierre-rouleau

git grep operations running on macOS fail. It fails even if a GNU grep is installed as reported in issue 428.

I suggest the following:

  • 1: Identify this problem in the readme text

  • 2: Dynamically prevent execution of the following git grep ert tests when the running OS is macOS:

    • dumb-jump-test-git-grep-rules-fail-test,
    • dumb-jump-test-git-grep-rules-not-test,
    • dumb-jump-test-git-grep-rules-test.

    For example the code for the first one of those could be modified to the following:

    (when (and (not (eq system-type 'darwin))   ; git grep is broken on macOS as of Jan 2026.                                                               $
               (dumb-jump-git-grep-installed?))
      (ert-deftest dumb-jump-test-git-grep-rules-fail-test ()
        (let* ((bad-rule '(:type "variable"
                                 :supports ("ag" "grep" "rg" "git-grep")
                                 :language "elisp"
                                 :regex "\\\(defvarJJJ\\b\\s*"
                                 :tests ("(defvar test ")))
               (dumb-jump-find-rules (cons bad-rule dumb-jump-find-rules))
               (rule-failures (dumb-jump-test-git-grep-rules)))
          (should (= (length rule-failures) 1))))
    
  • 3: Add macOS runner(s) in the CI workflow to run tests on macOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions