Fork me on GitHub
#dirac
<
2019-12-10
>
erik.de.wildt08:12:03

I’m unable to get the Dirac Agent running (listening on 8231) with shadow-cljs. I’ve added dirac to the dependencies, configured the nrepl middleware as dirac.nrepl/middleware and added dirac.runtime.preload to the preloads. However, i’m not sure how to start the agent. The docs mention a :repl-options {:init (do… for leiningen, but this doesn’t seem to work for shadow-cljs. Any help would be appreciated!

darwin12:12:38

unfortunately Dirac does not play well with shadow-cljs, I would like to add support at some point, but I’m waiting for some additions to shadow

erik.de.wildt13:12:07

Thanks for the reply. I was able to achieve my goal by using a simple script.

erik.de.wildt13:12:13

(require '[shadow.cljs.devtools.server :as server] ‘[shadow.cljs.devtools.api :as shadow] ’[dirac.agent]) (do (dirac.agent/boot!) (server/start!) (shadow/watch :app))

darwin16:12:45

Ok, good. I think this solution will work only partially. The Dirac REPL won’t be using shadow-cljs compiler in the backend. The holy grail in the future would be to connect Dirac REPL to shadow-cljs somehow.