mfikes / ambly

ClojureScript REPL into embedded JavaScriptCore
http://ambly.fikesfarm.com
Eclipse Public License 1.0
541 stars 21 forks source link

Doesn't work in Cursive #21

Closed mfikes closed 9 years ago

mfikes commented 9 years ago

Ambly doesn't currently work in Cursive. It'd be nice to sort out why/how.

Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java -Dclojure.compile.path=/Users/mfikes/Documents/Projects/ambly/Clojure/target/classes -Dambly.version=0.1.0-SNAPSHOT -Dfile.encoding=UTF-8 -Dclojure.debug=false -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 14 CE.app/Contents/bin" -classpath <long classpath elided> com.intellij.rt.execution.application.AppMain clojure.main -i /private/var/folders/m0/161fm8fx069fk_fny08nrmkm0000gp/T/form-init8814029275895923040.clj
Connecting to local nREPL server...
Clojure 1.6.0
nREPL server started on port 52260 on host 127.0.0.1
(require
  '[cljs.repl :as repl]
  '[ambly.repl.jsc :as jsc])
=> nil
(repl/repl* (jsc/repl-env)
  {:output-dir "out"
   :optimizations :none
   :cache-analysis true
   :source-map true})
To quit, type: :cljs/quit
ClojureScript:cljs.user> DEBUG: unknown status need-input

If you don't have the Ambly Demo app running you will instead get evidence that -startup is being called:

Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java -Dclojure.compile.path=/Users/mfikes/Documents/Projects/ambly/Clojure/target/classes -Dambly.version=0.1.0-SNAPSHOT -Dfile.encoding=UTF-8 -Dclojure.debug=false -Didea.launcher.port=7534 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 14 CE.app/Contents/bin" -classpath <long classpath elided> com.intellij.rt.execution.application.AppMain clojure.main -i /private/var/folders/m0/161fm8fx069fk_fny08nrmkm0000gp/T/form-init5516241156361831447.clj
Connecting to local nREPL server...
Clojure 1.6.0
nREPL server started on port 52292 on host 127.0.0.1
(require
  '[cljs.repl :as repl]
  '[ambly.repl.jsc :as jsc])
=> nil
(repl/repl* (jsc/repl-env)
  {:output-dir "out"
   :optimizations :none
   :cache-analysis true
   :source-map true})
To quit, type: :cljs/quit
ConnectException Connection refused  java.net.PlainSocketImpl.socketConnect (PlainSocketImpl.java:-2)

I think this is rooted in nREPL in some way.

mfikes commented 9 years ago

See cursiveclojure/cursive#358

mfikes commented 9 years ago

It is possible do do this using Piggyback. Documented in Ambly wiki.