Fork me on GitHub
#cider
<
2018-06-21
>
bbss12:06:18

I'm on CIDER 0.18.0snapshot (package: 20180611.2335) and my cljs repl doesn't get set properly. I can manually call cider-repl-set-type and that will make my next cider eval work, but after that gets set back to clj so I need to do that before each eval I want to do.

bbss12:06:02

Yep, am using shadow-cljs

bozhidar12:06:17

I’ll look at this when I can, but everyone is welcome to beat me to it. I’ll also likely add some override for the auto-detection the REPL type.

bozhidar12:06:44

Seems our middleware check for the repl type doesn’t work properly for shadow, but so far I haven’t had time to debug this.

bozhidar12:06:36

Here’s another discussion of the problem and a workaround for it https://github.com/clojure-emacs/cider/pull/2316

bbss12:06:35

I've seen that one before and even got two emacs functions from richiardiandrea , but couldn't get them to work, only one of the functions evalled

bozhidar12:06:30

This can be fixed properly only in the middleware, as I wrote somewhere in the PR comments. Anyways, I’ll try to add some form of the proposed workaround later today.

❤️ 1
bbss12:06:08

Oh please don't feel rushed by me.

bbss12:06:51

I can manage with the live-reload in the cljs world, in clj it would be pretty annoying to not have inline eval.

bozhidar17:06:11

Next time the beers are on you! 😉

💯 3
bbss17:06:39

For sure! 🍻

bbss18:06:03

@bozhidar I've updated to CIDER 0.18.0snapshot (package: 20180621.1033) but now when I select shadow-cljs in the jack in process I get:

error in process sentinel: Could not start nREPL server: npx: installed 225 in 4.837s
command not found: server

bbss18:06:00

I'm not sure it's related to the most recent cider commit, I don't see anything that does something with a server.

bbss18:06:46

I used package-refresh-contents, list-packages and shift-u x to update, so maybe some other packages got updated as well?

bozhidar19:06:48

No, that’s unrelated.

bozhidar19:06:21

What exactly is the command CIDER is running for you? Isn’t it npx shadow-cljs server?

bbss19:06:13

Running through the shadow-cljs installation instructions again, seems I didn't need those last time

bbss19:06:26

@bozhidar https://shadow-cljs.github.io/docs/UsersGuide.html#_launch_the_clojurescript_repl says to use cider-create-sibling-cljs-repl but I don't seem to have that according to my helm

bbss19:06:36

however all good when I use cider-connect-cljs to connect to the nrepl

bbss19:06:41

:thumbsup:

bbss19:06:26

Before it was more easy, I'd just run cider-jack-in-cljs and it would ask me the host port and build and set-up a clojure and clojurescript repl.

bbss19:06:52

Anyway thanks a bunch! it works 🙂

bozhidar19:06:04

The manual is a bit outdated right now. Unfortunately the PR which introduced the connection management changes didn’t update any documentation.

bozhidar19:06:29

The command is now cider-connect-sibling-cljs. There’s also cider-jack-in-clj&cljs.

bozhidar19:06:24

cider-jack-in-cljs now creates only a ClojureScript REPL, as many people mentioned in the past they wanted a command that didn’t create an extra Clojure REPL.

bozhidar19:06:46

Ah, that’s the shadow-cljs manual. Well, it can’t be updated before 0.18 is released.

bbss20:06:51

Yeah, makes sense. I'm happy it works, and I also sometimes didn't need the extra clj repl, when I am using a remote repl instead of running a server locally.

richiardiandrea22:06:07

it says cider-interaction.el file termination or something 😉