Fork me on GitHub

I am on develop, updated all packages: When I cider-jack-in, nREPL 0.21something gets started, and the REPL window rightfully complains that i should use 0.4.4+. I found a troubleshooting info in the nREPL repo that i need to set the nREPL dependency explicitly in ~/.lein/profiles.clj under the :repl key. I did that, now the lein command line i see in the minibuffer when doing the jack-in says something about nREPL 0.6.0, but still the 0.21something gets loaded. When i do a „lein repl" on the comman line, the 0.6 version gets loaded as expected. Any ideas?


Is there any nrepl in your project.clj?


No, absolutely not. Sorry for not stating that explicitly.


I have a untouched project.clj from a lein new app test-app


I just retested on my work windows machine, had an older version of develop there. lein command line in the minibuffer says its injecting nrepl 0.4.5 and cider-nrepl 0.19-SNAPHOT. Output in repl window says correct cider-nrepl version, but nrepl 0.2.12. I then pulled newest develop, updated all packages, did cider-jack-in again. Now commandline said nrepl 0.6.0 and cider-nrepl 0.22, but repl window still says nrepl 0.2.12, while cider-nrepl is 0.22. Obviously the nrepl dependency does not get updated correctly through command line?


But injecting cider-nrepl dependency works fine.


Looking closely, even lein repl on the command line does not pick up an explicit nrepl dependency from profiles.clj


So the root cause seems to bei lein, not cider or spacemacs.


Ah, i got it. Lein 2.8.1 is too old and is referencing org.clojure/tools.nrepl instead of nrepl/nrepl. So dynamically merging the nrepl/nrepl dependency has no effect, it still loads org.clojure/tools.nrepl.


NOW i found the hint in the nREPL docs that lein 2.9.0 minimum is needed… sigh

👍 4

@spfeiffer the minimum version of Leiningen is stated in the develop branch of the Spacemacs Clojure layer docs. However, its only in the manual connection section, so not very obvious. Would having a pre-requisites (Java, Leiningen, Boot, clj versions) at the start the the Clojure layer documentation help?


TBH, not really. It would help if cider-nrepl would not only warn me about the outdated nrepl dep, but also outdated lein.


That should be easy…so its not a spacemacs issue


Yes, reporting minimum Leiningen version sounds a good idea. Are you going to raise a ticket or PR with the CIDER project to see if they will add this?


I cannot do a PR, no knowledge of elisp. I could do the issue, though.


Has anyone experience a thing where, your spacemacs preferences must be manually loaded (`SPC f e R`) any time you start emacs?


There aren't any errors through or tests failed on startup, but I have to do that every time


@mathpunk nope. when ever I had things fail to load its either been a typo or error in .spacemacs file or a bug in a package. You could also just do SPC f e D and see if there are any significant changes between the version of Spacemacs you are running and the default .spacemacs-template Otherwise I suggest moving your .spacemacs file out of the way, restart Spacemacs (which creates a new .spacemacs file) and see if you get the same issue. Then just use ediff to add back your customisations into the new .spacemacs file and restart to see which of them causes the problem. If you are using any elisp code, you can away try evaluate it, , e e, when you have the .spacemacs file open to see if that code generates an error.


I can’t start repl from Spacemacs.


“I just purchased a new car, but it won’t start”. please give us some more info, what’s happening, what do you see in Messages buffer? Does nrepl buffer appear at all, what’s in there? Help us a bit so we can help you


I have just cleaned everything and install everything from the beginning.


Latest version Leiningen, Emacs, Spacemacs, Init project of a Re-Natal, MacOSX Mojave.


Again: What did you do, what did you expect to happen, what happened instead?


What made you think that the repl didn't start?


What was relevant output in the minibuffer, the message buffer and the repl buffer (if it exists)?


I have created a re-natal project with re-natal version 10.0.0.


I want to run this project with spacemacs.


Latest versions of everything.


clean install.


emacs, leiningen, spacemacs, .spacemacs file is new also!


I have to implement a prototype until tomorrow. This seems like a joke.


Spacemacs hangs when I cider-jack-in to the project.


@scknkkrer it seems you’re frustrated to the point that you are not paying attention to what we are trying to tell you. We got it - you have a clean install of everything. But we need to know more in order to help you. Establishing repl connection in a clojurescript project requires a few things, it’s not some kinda of magic “that just works right off the bat”.


Sorry, I have spend a whole day to figure out this like a monkey. You are right. Is there any trigger to give me a stacktrace or something to me ?


#### System Info 💻 - OS: darwin - Emacs: 26.2 - Spacemacs: 0.200.13 - Spacemacs branch: master (rev. c7a103a77) - Graphic display: nil - Distribution: spacemacs - Editing style: vim - Completion: helm - Layers: ‘’‘elisp (vimscript sql d php yaml typescript java javascript (indium :fetcher github :repo “NicolasPetton/Indium” :old-names (jade)) fsharp octave nginx (c-c++ :variables c-c++-enable-clang-support t c-c++-default-mode-for-headers ’c++-mode) ruby (clojure :variables clojure-enable-fancify-symbols t clojure-enable-clj-refactor t) (markdown :variables markdown-live-preview-engine ’vmd) haskell helm auto-completion exercism-layer html emacs-lisp git markdown org (shell :variables shell-default-height 30 shell-default-term-shell “/bin/zsh” shell-default-position ‘bottom) spell-checking syntax-checking version-control) ‘’‘ - System configuration features: JPEG RSVG IMAGEMAGICK GLIB NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2


@U0G75ARHC this is my info. I will bring another informations.


First try from the terminal. Does it work there? Then try connecting to the repl from Emacs. cider-connect, still works? Then do cider-jack-in, check nrepl buffer, check Messages buffer


Yes, but a few changes required. Cider.piggieback must be updated. I have done it, and then, yes, leiningen runs repl from command-line. And this works really great.


have you checked your local ~/.lein/profiles.clj


maybe there’s an old artifact or something


Yes, there is no profiles file on my mac. I have never needed.


I have just removed all repositories.


And tried again.


Nothing has changed.


remove piggieback from project.clj


I was trying to debug trace to the problem. But, toggling debug on error is not working either. When I try to Jack-in cider. It’s just hanging.


actually can you post your project.clj?


My project.clj file.


I have just removed the piggieback from my project. But it still doesn’t work.


When I try to delete .spacemacs file and reinstall clojure-layer.


It says like that after installing the layer.


File mode specification error: (file-mission Cannot open load file No such file or directory cider-eval-sexp-fu)


remove this as well: {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}


I have done it.


figwheel-sidecar is outdated


I have tried with 5.18 also.


lein-cljsbuild is outdated too


[org.clojure/clojurescript “1.10.520”]


[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.4.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.22.0-SNAPSHOT\"\] -- repl :headless :host localhost...


Show: Project-Only All 
  Hide: Clojure Java REPL Tooling Duplicates  (10 frames hidden)

1. Unhandled java.lang.Exception
   Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to
   load piggieback. This is commonly caused by A) not providing piggieback as a
   dependency and/or B) not adding piggieback middleware into your nrepl
   middleware chain.
   example profile.clj code: ----- :profiles {:dev {:dependencies
   [[cider/piggieback <current-version>] [org.clojure/tools.nrepl
   <current-version>]] :repl-options {:nrepl-middleware
   [cider.piggieback/wrap-cljs-repl]}}} ----- Please see the documentation for
   piggieback here 
   Note: Cider will inject this config into your project.clj. This can cause
   confusion when your are not using Cider.


repl.clj:  182  figwheel-sidecar.repl/eval19040/fn
      233  clojure.lang.MultiFn/invoke
                  repl.clj:  346  figwheel-sidecar.repl/repl
                  repl.clj:  344  figwheel-sidecar.repl/repl
       436  clojure.lang.RestFn/invoke
                system.clj:  525  figwheel-sidecar.system/start-figwheel-repl
                system.clj:  516  figwheel-sidecar.system/start-figwheel-repl
                system.clj:  589  figwheel-sidecar.system/figwheel-cljs-repl*
                system.clj:  587  figwheel-sidecar.system/figwheel-cljs-repl*
                system.clj:  610  figwheel-sidecar.system/cljs-repl*
                system.clj:  602  figwheel-sidecar.system/cljs-repl*
                system.clj:  636  figwheel-sidecar.system/start-repl
                system.clj:  630  figwheel-sidecar.system/start-repl
                system.clj:  634  figwheel-sidecar.system/start-repl
                system.clj:  630  figwheel-sidecar.system/start-repl
          160  clojure.lang.AFn/applyToHelper
          144  clojure.lang.AFn/applyTo
                  core.clj:  659  clojure.core/apply
                  core.clj:  652  clojure.core/apply
                system.clj:  644  figwheel-sidecar.system/cljs-repl
                system.clj:  642  figwheel-sidecar.system/cljs-repl
       421  clojure.lang.RestFn/invoke
              repl_api.clj:  114  figwheel-sidecar.repl-api/cljs-repl
              repl_api.clj:  107  figwheel-sidecar.repl-api/cljs-repl
              repl_api.clj:  111  figwheel-sidecar.repl-api/cljs-repl
              repl_api.clj:  107  figwheel-sidecar.repl-api/cljs-repl
                  user.clj:   21  user/start-figwheel
                  user.clj:   15  user/start-figwheel
       408  clojure.lang.RestFn/invoke
                      REPL:   43  user/eval32619
                      REPL:   43  user/eval32619
    7062  clojure.lang.Compiler/eval
    7025  clojure.lang.Compiler/eval
                  core.clj: 3206  clojure.core/eval
                  core.clj: 3202  clojure.core/eval
                  main.clj:  243  clojure.main/repl/read-eval-print/fn
                  main.clj:  243  clojure.main/repl/read-eval-print
                  main.clj:  261  clojure.main/repl/fn
                  main.clj:  261  clojure.main/repl
                  main.clj:  177  clojure.main/repl
       137  clojure.lang.RestFn/applyTo
                  core.clj:  657  clojure.core/apply
                  core.clj:  652  clojure.core/apply
                regrow.clj:   18  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
      1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   79  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  142  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
           22  clojure.lang.AFn/run
               session.clj:  171  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  170  nrepl.middleware.session/session-exec/main-loop
           22  clojure.lang.AFn/run
       748  java.lang.Thread/run


Not it needs piggieback.


I will give it.


what’s your cider-version?


can you run M-x cider-version?


CIDER 0.22.0snapshot (package: 20190419.1025)


@U0G75ARHC thank you. My Spacemacs’ repl is working now. I should have check twice the versions. If you have come to Turkey one day, just let me know. Thanks again.


no problem. I’m glad you have sorted it out