Closed Gozala closed 10 years ago
I have the same issue in Windows. Works fine in Linux. UPDATE: "Reload behaviors" did help.
Confirmed this as well on Clojure 0.0.13 and osx though the buggy behavior is slightly different. The connection shows up under connections but when trying to eval I get prompted for a new connection.
Digging into this I found that when a cljs eval is kicked off, it eventually raises an :exec.cljs!
behavior that finds no client when clients/discover
is called. There are two reasons why a project.clj/nrepl client isn't found. The first reason seems to be a bug - this line is missing a :path
key which clients/discover
needs. The second reason is that an nrepl client doesn't support the :editor.eval.cljs.exec
command. Looking at cljs.clj it seems that even :editor.eval.cljs
eventually calls :editor.eval.cljs.exec
which means that the Clojure plugin doesn't have cljs eval ability. Grepping reveals that only the LT (local), browser and websocket clients have this command. We should remove "or Clojurescript" from the nrepl/Clojure client description as it doesn't actually support cljs eval and is confusing to users including me. @ibdknox Is this assessment correct?
@ibdknox I'd love for clojurescript projects to have the same eval experience as clojure ones - eval and it just works. For projects that use lein-cljsbuild (which are most of em), I could attempt trying to automate the browser client by generating an html page and building cljs with lein-cljsbuild. Alternatively, I could eval with a headless browser like austin does with phantomjs. Have you spiked on anything like these or know of any obstacles?
@ibdknox Unless my above assessment is off, I'm going to remove "or ClojureScript" from here this weekend.
Closing as this was resolved with the above commit. Cutting a release later today or tomorrow
Attempts to make a clojurescript connection fail and provide no feedback. It is actually makes #6 even more confusing:
On attempt to eval choose connection dialog is brought up. Naturally user chooses clojure(script) project and points to
project.clj
. Nothing seems to happen though, no connections show up in connection bar, eval still brings same choose connection dialog.