hello! I'm trying out dirac with shadow-cljs. I've seen some issues about it, and in my own attemps I get stuck at this error:
SEVERE: Unable to bootstrap Dirac ClojureScript REPL:
#error {
:cause Assert failed: (set? ns-roots)
:via
[{:type clojure.lang.ExceptionInfo
:message Unexpected error during REPL initialization
:data #:cljs.repl{:error :init-failed}
:at [cljs.repl$repl_STAR_ invokeStatic repl.cljc 1217]}
{:type java.lang.AssertionError
:message Assert failed: (set? ns-roots)
:at [shadow.build.cljs_hacks$shadow_find_ns_starts_with invokeStatic cljs_hacks.cljc 644]}]
:trace
[[shadow.build.cljs_hacks$shadow_find_ns_starts_with invokeStatic cljs_hacks.cljc 644]
[shadow.build.cljs_hacks$shadow_find_ns_starts_with invoke cljs_hacks.cljc 642]
[cljs.compiler$shadow_depth invokeStatic compiler.cljc 85]
[cljs.compiler$shadow_depth invoke compiler.cljc 80]
[cljs.compiler$munge invokeStatic compiler.cljc 123]
[cljs.compiler$munge invoke compiler.cljc 111]
[cljs.compiler$munge invokeStatic compiler.cljc 112]
[cljs.compiler$munge invoke compiler.cljc 111]
[shadow.build.cljs_hacks$shadow_emit_var invokeStatic cljs_hacks.cljc 566]
[shadow.build.cljs_hacks$shadow_emit_var invoke cljs_hacks.cljc 522]
[shadow.build.cljs_hacks$fn__9254 invokeStatic cljs_hacks.cljc 568]
[shadow.build.cljs_hacks$fn__9254 invoke cljs_hacks.cljc 568]
[clojure.lang.MultiFn invoke MultiFn.java 229]
[cljs.compiler$emit invokeStatic compiler.cljc 202]
[cljs.compiler$emit invoke compiler.cljc 182]
[shadow.build.cljs_hacks$emit1 invokeStatic cljs_hacks.cljc 590]
[shadow.build.cljs_hacks$emit1 invoke cljs_hacks.cljc 583]
[clojure.core$run_BANG_$fn__8790 invoke core.clj 7715]
[clojure.lang.ArraySeq reduce ArraySeq.java 116]
[clojure.core$reduce invokeStatic core.clj 6827]
[clojure.core$run_BANG_ invokeStatic core.clj 7710]
[clojure.core$run_BANG_ invoke core.clj 7710]
[shadow.build.cljs_hacks$shadow_emits invokeStatic cljs_hacks.cljc 599]
[shadow.build.cljs_hacks$shadow_emits doInvoke cljs_hacks.cljc 598]
[clojure.lang.RestFn invoke RestFn.java 482]
[cljs.compiler$fn__3716 invokeStatic compiler.cljc 1252]
[cljs.compiler$fn__3716 invoke compiler.cljc 1250]
[clojure.lang.MultiFn invoke MultiFn.java 229]
[cljs.compiler$emit invokeStatic compiler.cljc 202]
[cljs.compiler$emit invoke compiler.cljc 182]
[cljs.compiler$emit_str invokeStatic compiler.cljc 261]
[cljs.compiler$emit_str invoke compiler.cljc 260]
[cljs.repl$evaluate_form invokeStatic repl.cljc 553]
[cljs.repl$evaluate_form invoke repl.cljc 499]
[cljs.repl$repl_STAR_ invokeStatic repl.cljc 1130]
[cljs.repl$repl_STAR_ invoke repl.cljc 1034]
[dirac.nrepl.eval$eval_in_cljs_repl_BANG_$start_repl_fn__9410 invoke eval.clj 193]
[dirac.nrepl.driver$wrap_with_driver invokeStatic driver.clj 140]
[dirac.nrepl.driver$wrap_with_driver invoke driver.clj 124]
[dirac.nrepl.eval$eval_in_cljs_repl_BANG_ invokeStatic eval.clj 197]
[dirac.nrepl.eval$eval_in_cljs_repl_BANG_ doInvoke eval.clj 159]
[clojure.lang.RestFn invoke RestFn.java 594]
[dirac.nrepl.utils$start_new_cljs_compiler_repl_environment_BANG_ invokeStatic utils.clj 73]
[dirac.nrepl.utils$start_new_cljs_compiler_repl_environment_BANG_ invoke utils.clj 47]
[dirac.nrepl.bootstrap$start_cljs_repl_BANG_ invokeStatic bootstrap.clj 61]
[dirac.nrepl.bootstrap$start_cljs_repl_BANG_ invoke bootstrap.clj 37]
[dirac.nrepl.bootstrap$bootstrap_BANG_ invokeStatic bootstrap.clj 81]
[dirac.nrepl.bootstrap$bootstrap_BANG_ invoke bootstrap.clj 68]
[dirac.nrepl$boot_dirac_repl_BANG_ invokeStatic nrepl.clj 30]
[dirac.nrepl$boot_dirac_repl_BANG_ doInvoke nrepl.clj 27]
[clojure.lang.RestFn invoke RestFn.java 408]
[shadow.user$eval34845 invokeStatic NO_SOURCE_FILE 1]
[shadow.user$eval34845 invoke NO_SOURCE_FILE 1]
[clojure.lang.Compiler eval Compiler.java 7177]
[clojure.lang.Compiler eval Compiler.java 7167]
[clojure.lang.Compiler eval Compiler.java 7132]
[clojure.core$eval invokeStatic core.clj 3214]
[clojure.core$eval invoke core.clj 3210]
[nrepl.middleware.interruptible_eval$evaluate$fn__6380 invoke interruptible_eval.clj 91]
[clojure.main$repl$read_eval_print__9086$fn__9089 invoke main.clj 437]
[clojure.main$repl$read_eval_print__9086 invoke main.clj 437]
[clojure.main$repl$fn__9095 invoke main.clj 458]
[clojure.main$repl invokeStatic main.clj 458]
[clojure.main$repl doInvoke main.clj 368]
[clojure.lang.RestFn invoke RestFn.java 1523]
[nrepl.middleware.interruptible_eval$evaluate invokeStatic interruptible_eval.clj 84]
[nrepl.middleware.interruptible_eval$evaluate invoke interruptible_eval.clj 56]
[nrepl.middleware.interruptible_eval$interruptible_eval$fn__6406$fn__6410 invoke interruptible_eval.clj 155]
[clojure.lang.AFn run AFn.java 22]
[nrepl.middleware.session$session_exec$main_loop__6633$fn__6637 invoke session.clj 190]
[nrepl.middleware.session$session_exec$main_loop__6633 invoke session.clj 189]
[clojure.lang.AFn run AFn.java 22]
[java.lang.Thread run Thread.java 830]]}
Jun 06, 2020 2:42:13 PM clojure.tools.logging$eval7560$fn__7563 invoke
SEVERE: [NREPLTunnelServer#1 of [NREPLTunnel#1]] Received a bootstrap error from client [WebSocketServerClient#1] :
{:op :bootstrap-error}
(sorry for the long message, wasn't able to attach it as a code "file" in slack)
I understand if this isn't supported, but wanted to ask if it's possible to get running? 🙂 breakpoints with cljs would be very nice
@saikyun Dirac REPL really doesn’t work with shadow-cljs, but you don’t need Dirac REPL to use other Dirac enhancements
simply use Dirac instead of DevTools and don’t use Dirac’s REPL
@darwin thanks for the quick reply. it's the repl I'm currently most interested in (specifically being able to use breakpoints + the cljs repl).
would it be possible/practical to get the ad-hoc repl working, without caring about what shadow-cljs does?
yes, run another nREPL server (using leingingen for example) and connect to it with Dirac REPL
you will have to keep lein’s project.clj in sync with your shadow-cljs setup
you should keep boths setups separate, so their compilation output does not clash