Last month someone helped me get Cider working on a Clojure project. I loved the functionality, particularly M-., cider-jump-to-var
. But since then I haven't been able to replicate the correct behavior, either in the original project or in a new one, and the person who helped set me up originally is no longer available.
In the original project, which I still have checked out, there's a line
[cider/cider-nrepl "0.7.0"]
in the :dependencies
section of my project.clj
. When I add such a line to my new project, then run lein repl
and cider-connect
, I get this message:
; CIDER 0.8.0alpha (package: 20141006.507) (Java nil, Clojure 1.6.0, nREPL 0.2.3)
WARNING: The following required nREPL ops are not supported:
classpath complete info inspect-start inspect-refresh inspect-pop inspect-push inspect-reset macroexpand ns-list ns-vars resource stacktrace toggle-trace undef
Please, install (or update) cider-nrepl 0.8.0-snapshot and restart CIDER
WARNING: CIDER's version (0.8.0-snapshot) does not match cider-nrepl's version (0.7.0)
Sure enough, when I to jump to the definition of a symbol (say first
), I get:
cider-ensure-op-supported: Can't find nREPL middleware providing op "info". Please, install (or update) cider-nrepl 0.8.0-snapshot and restart CIDER
Oddly, I get the same error when I change the version of cider/cider-nrepl
to "0.8.0-SNAPSHOT"
in project.clj
.
But then I notice on the cider-nrepl Github page that the cider/cider-nrepl
line is supposed to be in :plugins
, not :dependencies
. It definitely wasn't in my original project, but it still worked somehow. Fine, so I move it to :plugins
in my new project. This time the nrepl process starts up with no errors, but when I try to jump to the definition of, again, say, first
, I get:
Symbol first not resolved
Now if I try downgrading back to 0.7.0
, I get a shorter message when I start up cider:
WARNING: The following required nREPL ops are not supported:
ns-list ns-vars undef
Please, install (or update) cider-nrepl 0.8.0-snapshot and restart CIDER
WARNING: CIDER's version (0.8.0-snapshot) does not match cider-nrepl's version (0.7.0)
...but I get the same "Symbol first not resolved" as before.
This is really frustrating. I vaguely recall some kind of version mismatch message when I worked on my original project, and the jump-to-definition feature still worked. Now I can't get it working for the life of me. Any assistance would be immensely appreciated.
EDITED TO ADD:
Before embarking on the exploration described above, I deleted and re-installed Cider from my packages list. I also deleted ~/.m2/repository/cider
between each step.
This morning, I had Cider version 20141006.507
. An update was available, so that I now have version 20141007.452
. The command cider-version
returns just CIDER 0.8.0-snapshot
. With [cider/cider-nrepl "0.8.0-SNAPSHOT"]
in the :plugins
section of my project.clj
, I still get Symbol <whatever> not resolved
no matter which symbol I try.