jasongilman / proto-repl

A Clojure Development Environment package for the Atom editor
https://atom.io/packages/proto-repl
MIT License
562 stars 50 forks source link

Clojurecript repl on remote repl #128

Open karneaud opened 8 years ago

karneaud commented 8 years ago

is the package capable of running cljs in remote repl?

jasongilman commented 8 years ago

It has some limited support for it. There were problems in the past connecting to a ClojureScript REPL but most of them should be fixed. I'd classify it under experimental right now.

On Jul 24, 2016, at 3:56 PM, karneaud notifications@github.com wrote:

is the package capable of running cljs in remote repl?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

karneaud commented 8 years ago

i was able to connect remotely to repl but when trying to run clojurescript via cljs.repl with rhino I'm able to get the prompt under user but not able to execute any code

to reproduce

  1. connect to remote repl
  2. required cli (require '[cljs.repl :as repl] '[cljs.repl.rhino :as rhino]) (repl/repl* (rhino/repl-env) {:output-dir "out" :optimizations :none :cache-analysis true :source-map true})
  3. when connected ran (+ 1 1)

not sure what the problem is as I was able to do this locally via terminal on the host

gmp26 commented 8 years ago

I have a test repo that almost works with figwheel at https://github.com/gmp26/figwheel-atom-editor-starter. This follows the same figwheel setup as for intellij, but with an extra project.clj dependency on proto-repl. You have to run the script/repl.clj commands by hand once nrepl starts to get you into the cljs browser repl.

It starts up and works once, but shut down is problematic as :cljs/quit does nothing, and somehow the figwheel port 3449 (or 3450 in this case) never closes. Even closing down atom does not close the port.

In fact, none of the figwheel commands (stop-autobuild) .. (fig-status) work as they are all intercepted somewhere and barf. More worryingly, in-ns is also ineffective.

I see that people have been this way before in issue #54 and maybe also in the repl-lite repo.

rgdelato commented 7 years ago

@gmp26 With the most recent version of Proto REPL, you should now be able to use :cljs/quit, (fig-status), and the like and they should work correctly now.

gmp26 commented 7 years ago

@rgdelato Very nice. Not in a position to try this immediately, but good to know it's there.