Here is an example config to demonstrate the problem I am facing:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'use-package)
(setq use-package-always-ensure t)
(use-package cider)
Previously, this would cause use-package
to install CIDER just fine; however, since I removed my ~/.emacs.d/elpa
directory today to update my packages, I now get this error when I run emacs --debug-init
:
Debugger entered--Lisp error: (void-function if-let)
(if-let ((cons (assoc car alist))) (setcdr cons (list cadr)) (set symbol (cons (list car cadr) alist)))
(let ((alist (symbol-value symbol))) (if-let ((cons (assoc car alist))) (setcdr cons (list cadr)) (set symbol (cons (list car cadr) alist))))
cider-add-to-alist(cider-jack-in-dependencies "org.clojure/tools.nrepl" "0.2.12")
byte-code("\300\301\302\303#\210\304\301\305\306#\207" [put cider-jack-in-dependencies risky-local-variable t cider-add-to-alist "org.clojure/tools.nrepl" "0.2.12"] 4)
require(cider nil t)
(not (require (quote cider) nil (quote t)))
(if (not (require (quote cider) nil (quote t))) (ignore (message (format "Cannot load %s" (quote cider)))))
(progn (progn (require (quote package)) (use-package-ensure-elpa (quote cider))) (if (not (require (quote cider) nil (quote t))) (ignore (message (format "Cannot load %s" (quote cider))))))
eval-buffer(#<buffer *load*> nil "/home/sam/.emacs" nil t) ; Reading at buffer position 228
load-with-code-conversion("/home/sam/.emacs" "/home/sam/.emacs" t t)
load("~/.emacs" t t)
#[0 "\205\262
If I close Emacs and run emacs --debug-init
again, I get a slightly different error:
Debugger entered--Lisp error: (invalid-function (cons (assoc car alist)))
(cons (assoc car alist))()
cider-add-to-alist(cider-jack-in-dependencies "org.clojure/tools.nrepl" "0.2.12")
byte-code("\300\301\302\303#\210\304\301\305\306#\207" [put cider-jack-in-dependencies risky-local-variable t cider-add-to-alist "org.clojure/tools.nrepl" "0.2.12"] 4)
require(cider nil t)
(not (require (quote cider) nil (quote t)))
(if (not (require (quote cider) nil (quote t))) (ignore (message (format "Cannot load %s" (quote cider)))))
(progn (progn (require (quote package)) (use-package-ensure-elpa (quote cider))) (if (not (require (quote cider) nil (quote t))) (ignore (message (format "Cannot load %s" (quote cider))))))
eval-buffer(#<buffer *load*> nil "/home/sam/.emacs" nil t) ; Reading at buffer position 228
load-with-code-conversion("/home/sam/.emacs" "/home/sam/.emacs" t t)
load("~/.emacs" t t)
#[0 "\205\262
What exactly is causing this regression? Is it an error in the definition of cider-add-to-alist
, or in one of that function's usages (with cider-jack-in-dependencies
, cider-jack-in-dependencies-exclusions
, or cider-jack-in-lein-plugins
)? Or is it an error in use-package
? Is there any workaround for this error that will allow me to continue using all my packages until it gets fixed?
Invalid function (cons (assoc car alist))
in spacemacs.