proto-repl icon indicating copy to clipboard operation
proto-repl copied to clipboard

Clojurecript repl on remote repl

Open karneaud opened this issue 8 years ago • 5 comments

is the package capable of running cljs in remote repl?

karneaud avatar Jul 24 '16 19:07 karneaud

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 [email protected] 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.

jasongilman avatar Jul 24 '16 21:07 jasongilman

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

karneaud avatar Jul 24 '16 21:07 karneaud

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.

gmp26 avatar Aug 09 '16 21:08 gmp26

@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.

rgdelato avatar Jul 04 '17 05:07 rgdelato

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

gmp26 avatar Jul 04 '17 08:07 gmp26