Unable to get Sider to work

Last month, someone helped me get Sider to work on a Clojure project. I liked the functionality, especially M-. , cider-jump-to-var . But since then I have not been able to reproduce the correct behavior, both in the original project and in the new one, and the one who helped me adjust the outcome is no longer available.

In the original project, which I still checked, there is a line

 [cider/cider-nrepl "0.7.0"] 

under :dependencies my project.clj . When I add this line to my new project, run lein repl and cider-connect , I will 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 version (0.8.0-snapshot) does not match cider-nrepl version (0.7.0) 

Of course, when I go to the definition of a character (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 enough, 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 Cid-nrepl Github page that the cider/cider-nrepl should be in :plugins , not :dependencies . It was definitely not in my original project, but it worked somehow somehow. Great, so I am moving it to :plugins in my new project. This time the nrepl process starts without errors, but when I try to go to the definition, again, say, first , I get:

 Symbol first not resolved 

Now, if I try to return to 0.7.0 , I will get a shorter message when starting the 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 version (0.8.0-snapshot) does not match cider-nrepl version (0.7.0) 

... but I get the same "Character is not allowed first", as before.

This is really frustrating. I vaguely recall a message about a version mismatch when I was working on my original project, and the transition to definition function still worked. Now I can’t make it work for me. Any help would be greatly appreciated.

EDIT ADD:

Before starting the research described above, I removed and installed Cider from the list of my packages again. I also deleted ~/.m2/repository/cider between each step.

This morning I had a version of Cider 20141006.507 . An update is available, so now I have version 20141007.452 . The cider-version command returns only 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 what character I'm trying to execute.

+6
source share
2 answers

So, apparently, the main bit that I was missing, which I accidentally stumbled upon, was that before M-. will work, I needed to go up and evaluate the initial form of the ns file using Cx Ce ( cider-eval-last-sexp ).

Sometimes I get an error message when I try to get to the definition, for example, "Invalid argument of type: arrayp", but it works often enough to be used.

Suggestions on how to improve this process would be welcome.

+1
source

Most likely you are installing the CIDER package in Emacs from the MELPA repository, which means that you are installing the last CIDER snapshot that requires the middleware [cider / sider-nrepl "0.8.0-SNAPSHOT"] in your .clj project to work correctly.

Since you are using the CIDER snapshot package, you also cannot use the 0.7.0 CIDER middleware.

When you start a replica using Mx cider-jack-in or from the command line using lein repl, the latest CIDER middleware is checked and downloaded (by default, daily) Leiningen before running repl.

This means that the middleware snapshot may no longer synchronize with your version of Emacs CIDER, because by default you will have a snapshot of the Emacs CIDER that was manually installed during installation.

To return the middleware package and Emacs CIDER, you must install the latest CIDER Emacs package through the Mx package-list-packages and select the cider package to install.

Then you must restart Emacs and run Mx cider-version and confirm that you are receiving the following (as of today) in the messages:

CIDER 0.8.0snapshot (package: 20141007.13)

cider-jump-to-var and all other CIDER functions should work.

+9
source

Source: https://habr.com/ru/post/976339/


All Articles