clojure-emacs / squiggly-clojure

Flycheck checker for Clojure, using eastwood and core.typed.
GNU General Public License v3.0
204 stars 25 forks source link

Getting (wrong-type-argument stringp nil) on simple project #30

Closed OlegTheCat closed 8 years ago

OlegTheCat commented 8 years ago

Hi.

I'm getting the following error on simple project (almost no code there):

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  signal(wrong-type-argument (stringp nil))
  #[257 "\300 \210\301@A\"\207" [flycheck-report-failed-syntax-check signal] 4 "\n\n(fn ERR)"]((wrong-type-argument stringp nil))
  funcall(#[257 "\300 \210\301@A\"\207" [flycheck-report-failed-syntax-check signal] 4 "\n\n(fn ERR)"] (wrong-type-argument stringp nil))
  flycheck-buffer()
  #[0 "\300 \207" [flycheck-buffer] 1 "\n\n(fn)"]()
  funcall(#[0 "\300 \207" [flycheck-buffer] 1 "\n\n(fn)"])
  flycheck-buffer-automatically(idle-change)
  flycheck-handle-idle-change()
  apply(flycheck-handle-idle-change nil)
  byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 22120 40256 428447 nil flycheck-handle-idle-change nil nil 509000])

My config is as follows:

{:user {:plugins [[lein-localrepo "0.5.2"]
                  [cider/cider-nrepl "0.10.0"]
                  [refactor-nrepl "1.1.0"]]
        :dependencies [[acyclic/squiggly-clojure "0.1.4"]
                       [org.clojure/tools.nrepl "0.2.12"]]}}

I suppose that there's some conflicts in configuration and I'd be glad if someone pointed me where to look for solution.

Thanks in advance.

arichiardi commented 8 years ago

Yep I confirm, I had to disable it as well

expez commented 8 years ago

While not really related, refactor-nrepl 1.1.0 doesn't work with clojure 1.7 due to the breaking changes made to the reader. You should upgrade to 2.0.0-snapshot for now along with the version available on melpa (not melpa stable) for the emacs portion.

arichiardi commented 8 years ago

Ah ok good to know, I will pull snapshot then

OlegTheCat commented 8 years ago

Unfortunately, usage of refactor-nrepl-2.0.0-SNAPSHOT didn't help :(

codeitagile commented 8 years ago

Same issue for me, with same versions as @OlegTheCat

akahl-owl commented 8 years ago

I found the problem. nrepl-request:eval is invoked with nil for the connection argument in cider-flycheck-eval. I'll prepare a fix in a fork. This appears to be fixed in master, where cider-nrepl-request:eval is used. So using a development build should work until 0.1.5 is out - somehow, latest master is not on MELPA.

As a short-term workaround, you can overwrite the faulty function like this:

(defun cider-flycheck-eval (input callback)
  "Send the request INPUT and register the CALLBACK as the response handler.
Uses the tooling session, with no specified namespace."
  (nrepl-request:eval input callback (cider-current-connection) (nrepl-current-tooling-session)))
OlegTheCat commented 8 years ago

@akahl-lshift after this fix squiggly seems to be working. Thanks a lot.

benedekfazekas commented 8 years ago

again, quite unrelated but clj-refactor/refactor-nrepl 2.0.0 is out for a few weeks now too ;)