Why can't I call (or access in any way) cljs.repl/repl
(https://github.com/clojure/clojurescript/blob/69b66374d857a176c5a9cd8cc0cbb7506876640d/src/main/clojure/cljs/repl.cljc#L1226)?
λ clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "RELEASE"}}}' -M -m cljs.main --repl
ClojureScript 1.10.773
cljs.user=> (require '[cljs.repl :as repl])
nil
cljs.user=> (repl/repl)
WARNING: Use of undeclared Var cljs.repl/repl at line 1 <cljs repl>
Execution error (TypeError) at (<cljs repl>:1).
undefined is not an object (evaluating 'cljs.repl.repl.call')
cljs.user=> (repl/pst)
TypeError: undefined is not an object (evaluating 'cljs.repl.repl.call')
@
@
eval code@
eval@[native code]
@http://localhost:9000/clojure/browser/repl.js:119:300
clojure$browser$repl$evaluate_javascript@http://localhost:9000/clojure/browser/repl.js:122:4
@http://localhost:9000/clojure/browser/repl.js:385:57
@http://localhost:9000/clojure/browser/repl.js:387:4
@http://localhost:9000/goog/messaging/abstractchannel.js:141:21
@http://localhost:9000/goog/net/xpc/crosspagechannel.js:729:19
@http://localhost:9000/goog/net/xpc/nativemessagingtransport.js:321:23
@http://localhost:9000/goog/events/events.js:753:25
@http://localhost:9000/goog/events/events.js:879:34
@http://localhost:9000/goog/events/events.js:296:42
nil
Oh, I guess it must be one of those functions that's only available in Clojure.
My use case is that I want to connect to a ClojureScript Socket REPL (https://gist.github.com/swannodette/f1a9bfbf7cc4d0c43e61) from my editor and start a new REPL inside the original REPL, but I guess that's not possible.
you can start a CLJ REPL and then start the CLJS REPL from there. CLJS from inside CLJS doesn't work.
Right, thanks. I think I can make that work. Ideally, I'd really like to start something like a CLJC REPL, but let's see if I can make that work.
I am getting an Eval timed out!
error when trying to pprint a (very) large map in a cljs repl (i’m using CIDER). any way to get around this? Like when I pprint a huge map in clojure it will truncate the output at some point.
@andrea_fleckenstein you might benefit from https://github.com/brandonbloom/fipp which is faster than pprint and supports cljs
there are also dynamic vars in clojure.core
that control printing
clojure.core/*print-level*
can limit the depth of printing large nested things
clojure.core/*print-length*
can limit how many elements of a large collection will be printed