spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
alidlorenzo 2020-03-07T19:34:22.090200Z

I just setup spacemacs (used @jr0cket guide/setup, thanks btw!) and I’m trying to get cider repl working with shadow-cljs. I confirmed it works with a basic clj project, but can’t seem to get code evaluated with shadow. Is there extra configuration or steps required for this? I do this this warning in repl* console: WARNING: CIDER 0.25.0-snapshot requires 'cider-nrepl 0.25.0-SNAPSHOT, but you're currently using cider-nrepl 0.21.1. The version mismatch might break some functionality! So that might be the cause. But not sure where the cider repl version is specified, I don’t see it in spacemacs init.el file and specifing a specifc version in my projects deps.edn does not seem to change anything.

practicalli-john 2020-03-07T20:34:08.096700Z

@alidcastano it depends how you are starting the REPL. If you start the REPL outside of Spacemacs, via some shadow-clj command and then using cider-connect from Spacemacs, then there may be a an older version of cider-nrepl somewhere in the shadow-clj project. If you are using cider-jack-in-cljs or cider-jack-in-clj&cljs then it would be very strange to get this error, unless there is something in the shadow-cljs again adding an eariler version of cider-nrepl .

practicalli-john 2020-03-07T20:35:31.098300Z

Does the shadow-cljs project use a Leiningen http://project.cl

alidlorenzo 2020-03-07T20:38:31.099300Z

it uses a deps.edn configuration I’ve tried both ways: cider-jack-in and cider-connect, can’t seem to get it working in either case and in both situations see that warning in the repl console.

practicalli-john 2020-03-07T20:40:58.100900Z

if you look in the SPC b m message buffer it should show you the full command that is used to start the REPL from Emacs. Or you can use SPC u before jack-in or connect to check / edit the command used.

practicalli-john 2020-03-07T20:42:06.102200Z

It sounds like the shadow-cljs project has an earlier version of cider-nrepl, which I assume it uses to start an nREPL server so that an editor, such as Emacs/Spacemacs/Cider can connect to.

practicalli-john 2020-03-07T20:42:29.102700Z

I am reading through the shadow-cljs docs to see if I can understand what is happening

practicalli-john 2020-03-07T20:45:07.103Z

This seems relevant, just reading it now https://shadow-cljs.github.io/docs/UsersGuide.html#user-config

alidlorenzo 2020-03-07T20:46:02.103600Z

SPC b m seems to kill all buffers

alidlorenzo 2020-03-07T20:47:57.106Z

thanks for link, and for looking into it. I did try explicitly specifying a cider-repl version but perhaps I didn’t do it right. will try again

practicalli-john 2020-03-07T20:48:09.106300Z

Yes, edit the ~/.shadow-cljs/config.edn which I assume is the main config that shadow creates across all your projects. It should have been created the first time you ran shadow-cljs. Put a newer dependency in there

{:dependencies
 [[cider/cider-nrepl "0.25.0-SNAPSHOT"]]}

alidlorenzo 2020-03-07T20:49:44.107100Z

since i’m using deps.edn along with shadow, I think I need to specify it there. but I’ll try both ways

alidlorenzo 2020-03-07T20:50:24.107500Z

ah

alidlorenzo 2020-03-07T20:50:30.107700Z

that’s a global config

alidlorenzo 2020-03-07T20:50:39.108100Z

i do see the wrong version specific there, that must be it! thanks

practicalli-john 2020-03-07T20:51:35.109200Z

if you still get a warning, then you could also check ~/.nrepl/nrepl.edn or in the .nrepl.edn file inside the project (I guess at the root of the project).

practicalli-john 2020-03-07T20:52:06.109900Z

I havent tried shadow-cljs yet, so let me know if you get it working. I will give it a try one day soon 🙂

alidlorenzo 2020-03-07T20:56:43.110700Z

trying it now, will report back!

practicalli-john 2020-03-07T20:58:52.112300Z

You should just be able to cider-jack-in-clj&cljs and evaluate code from within Spacemacs. However, I dont think you are supposed to run the shadow-cljs server if you do jack-in from Emacs, it should run the shadow-cljs server for you.

alidlorenzo 2020-03-07T21:05:24.112400Z

so i’m now seeing `clj-refactor and refactor-nrepl are out of sync. Their versions are 2.5.0 (package: <tel:202002291105|20200229.1105>) and n/a`

alidlorenzo 2020-03-07T21:06:30.112600Z

i also see this in buffer that starts the repl

WARNING: The configured :dependencies in shadow-cljs.edn were ignored!
         When using :deps they must be configured in deps.edn
so not sure if global shadow config is used, i think maybe its n/a now because i removed cider from my deps.edn

alidlorenzo 2020-03-07T21:06:49.112800Z

will play around with it to see what works but at least now i’m seeing a different warning 😅

alidlorenzo 2020-03-07T21:08:13.114200Z

yes, when i jack-in i do see the shadow-cljs server running - it’s just doesn’t seem to be evaluating the code, which is why I’m trying to fix the version mismatch warning I see in repl console