Fork me on GitHub
#cursive
<
2016-02-14
>
cfleming07:02:29

@oshyshko: You have a Clojure file open, and it looks like you’re putting clojurescript code into it.

cfleming07:02:49

You need to create a cljs file and put your ClojureScript in there.

cfleming07:02:10

@lsenta: Does the REPL hang, or IntelliJ itself?

lsenta09:02:11

@cfleming: only the REPL

lsenta09:02:42

I wrap the tests in a start luminus server / stop

lsenta09:02:12

I think I found the issue, luminus calls shutdown-agents during the stop

cfleming09:02:03

@lsenta: Does the same thing happen when using lein repl?

oshyshko09:02:28

@cfleming: I've just retried with a .cljs file: the behaviour is exactly the same, I can attach to Figwheel via nRepl. After I do (cljs-repl), I can type directly into the REPL (and I see the browser executing my forms), however "Send top form to REPL" shortcut show that red error tooltip. Any ideas?

cfleming09:02:51

@oshyshko: There’s a dropdown in the REPL toolbar which allows you to tell Cursive that the REPL is either clj or cljs. Set that to CLJS and it should work if you’re sending forms from a .cljs file.

lsenta09:02:10

@cfleming How can I check that? I'm trying lein with-profile default,test repl but when I in-ns to my test module it's empty

lsenta09:02:20

It works fine with lein test-refresh for sure

cfleming09:02:22

@lsenta: You probably have to require the test ns when using lein, Cursive will auto-load it for you.

lsenta09:02:39

@cfleming Thanks, so yea it kills the REPL too

lsenta09:02:13

I get a

SocketException The transport's socket appears to have lost its connection to the nREPL server
at the end of the tests

lsenta09:02:34

After changing the code, looks like shutdown-agents was the issue

lsenta09:02:03

Opened a ticket in luminus, thanks for the help @cfleming !

oshyshko11:02:04

@cfleming I've just double-checked that I am using [cljs] value for that dropbox. I am getting the red error (from my screenshot). Copy-and-pasting form directly into REPL text area works fine, sending from editor -- not working.

oshyshko12:02:36

@cfleming could you possibly recommend me a step-by-step tutorial for setting Figwheel + Cursive + REPL, so I could follow it and figure out if I am doing anything wrong? Truth is, I discovered this problem with CLJS REPL over a year ago, it's still here and it is the only reason why I am still using La Clojure for CLJS development simple_smile

cfleming15:02:59

@oshyshko: It looks like you have a test project you used to create that screenshot above. Could you put it on Github so I can reproduce what you’re seeing?