Fork me on GitHub
#cider
<
2017-08-24
>
myguidingstar07:08:25

hi all i'm trying to use shadow's cljs repl with cider

myguidingstar07:08:14

I cider-connect to shadow's nrepl port, then (require '[shadow.cljs.devtools.api :refer [repl]]) and (repl :my-build)

myguidingstar07:08:35

however I can't type directly into the new cljs repl (brought by the (repl ...) above)

myguidingstar07:08:24

instead emacs shows up a Stdin: input dialog

myguidingstar07:08:24

and whatever i typed in that stdin dialog will be evaluated in the browser

myguidingstar08:08:26

Quoted from the above: This DOES NOT WORK while in nREPL unless your nREPL client supports needs-input

myguidingstar08:08:59

but I don't understand what that means

myguidingstar08:08:51

btw, the cljs-repl works nornmally if I just start it from a clj-repl outside of emacs, eg with boot repl -c

richiardiandrea08:08:55

@myguidingstar I tried and could not make it work either. One thing that differs that comes to mind is the prompt: you need another regex

myguidingstar08:08:38

I've just got an answer from shadow-cljs

myguidingstar08:08:11

i should use (shadow/nrepl-select ...) instead of (shadow/repl ...)

richiardiandrea08:08:26

Lol I was going to add...btw the wiki has that: https://github.com/thheller/shadow-cljs/wiki/REPL

richiardiandrea08:08:46

I was working on a shadow-mode a bit a couple of weeks ago, but it was more of an inferior mode than a fully fledged cider experience

dominicm13:08:10

needs-input is used when something tries to read from *in* and can't get anything. The client should prompt the user for input at that time.

dpsutton13:08:32

it can also happen in another way. (read nil) will prompt the user for input, so if there is a read call on a nil variable you will see this as well. My first look would be to find all reads and see if any of the forms could be nil

dominicm13:08:56

I'm presuming this isn't a mistake, and is actually intentional & correct usage of the nREPL given that it's part of the docs.