bbatsov / helm-projectile

Helm UI for Projectile
329 stars 71 forks source link

Lisp-error: (void-function -sort) after updating to projectile 20160830.138 (Replace dash with cl-lib #1046) #43

Closed stefano-m closed 8 years ago

stefano-m commented 8 years ago

After updating to the latest projectile, calling helm-projectile-on fails with

Debugger entered--Lisp error: (void-function -sort)
  -sort(#[(it other) "@    @W\207" [it other] 2] ((97 "Run ack on project." #[nil "\300\301!\207" [call-interactively helm-projectile-ack] 2]) (63 "Commander help buffer." #[0 "\302\303\304D\305\303\306\302EDC\217\210r\307!q\210\310c\210 \211\2031
  helm-projectile-commander-bindings()
  helm-projectile-toggle(1)
  helm-projectile-on()
  eval((helm-projectile-on) nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

I believe that this is due to the change introduced by https://github.com/bbatsov/projectile/pull/1046

To reproduce, launch a minimal Emacs with helm using the emacs-helm.sh script provided by the helm package and then load the following code:

(add-to-list 'load-path (expand-file-name "~/.emacs.d/elpa/helm-projectile-20160807.313"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/elpa/projectile-20160830.138/"))

(require 'helm-projectile)

(helm-projectile-on)

I am using the following packages from MELPA

with GNU Emacs 24.5.1.

To make the error go away I need to force byte-compilation of helm-projectile:

(byte-recompile-directory (expand-file-name "~/.emacs.d/elpa/helm-projectile-20160807.313") 0 t)
bbatsov commented 8 years ago

helm-projectile needs to be updated to drop dash.el as well.

c02y commented 8 years ago

comment this out temporarily

(helm-projectile-on)
syohex commented 8 years ago

I think this issue is fixed by #45.

zzantares commented 8 years ago

Yes!, I have updated to 20160902.2236 and is working well again.

Thanks @syohex !

davidsm commented 8 years ago

Unfortunately, I can still reproduce the issue with helm-projectile-20160902.2236, using the same steps as @stefano-m.

Using Emacs 24.5.1 on Windows.

syohex commented 8 years ago

Is byte-compiled file updated ? Please uninstall and reinstall and try again.

davidsm commented 8 years ago

Manually deleting the .elc files does seem to have done the trick. I did run byte-recompile-directory before, which didn't solve the problem, and the .elc file had timestamps that suggested they were updated, but there's probably something I don't get about how Emacs loads code...

Thanks anyway!