Wilfred/deadgrep

dash's -when-let breaks existing functionality

dpassen opened this issue · 1 comments

Since the change from when-let to dash's -when-let, deadgrep is unable to find the root directory of my projects and searches only within the working directory of the file.

A small example to illustrate:

(when-let ((answer '("~/apps/grand-sort/")))
    answer)

=> ("~/apps/grand-sort/")

(-when-let ((answer '("~/apps/grand-sort/")))
    answer)

=> nil

About your environment:
Platform: darwin
Emacs version: 27.2
Command: rg --color=ansi --line-number --no-heading --no-column --with-filename --fixed-strings --smart-case -- adjust-appkit-date .
default-directory: "/Users/dpassen/apps/grand-sort/"
exec-path: ("/usr/local/bin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Library/TeX/texbin" "/usr/local/sbin" "/Users/dpassen/.bin" "/Applications/Emacs.app/Contents/MacOS/libexec" "/Applications/Emacs.app/Contents/MacOS/bin")
tramp-remote-path: (tramp-default-remote-path "/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" "/opt/bin" "/opt/sbin" "/opt/local/bin")

Initial output from ripgrep:
> Omitted

Please file bugs at https://github.com/Wilfred/deadgrep/issues/new
$ rg --version
ripgrep 13.0.0
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
Package dash is dependency.

     Status: Installed in ‘dash-20210826.1149/’ (unsigned).
    Version: 20210826.1149
     Commit: da167c51e9fd167a48d06c7c0ee8e3ac7abd9718
    Summary: A modern list library for Emacs
   Requires: emacs-24
Required by: terraform-mode-20210621.1953, magit-section-20211226.738, magit-20211226.738, kubel-20211129.2118,
               ht-20210119.741, groovy-mode-20210831.1601, git-commit-20211204.2135, dumb-jump-20211018.1545,
               deadgrep-20211226.1840
   Homepage: https://github.com/magnars/dash.el
   Keywords: extensions lisp 
 Maintainer: Magnar Sveen <magnars@gmail.com>
     Author: Magnar Sveen <magnars@gmail.com>
Other versions: 20210826.1149 (melpa), 2.19.1 (gnu).


A modern list API for Emacs.

See its overview at https://github.com/magnars/dash.el#functions.

Argh, this is hard to catch with tests. Thanks for the great bug report.