Fork me on GitHub
#dirac
<
2019-07-28
>
superstructor18:07:54

I've made a few attempts at getting Dirac working with shadow-cljs, mostly failing. Got a bit further than https://github.com/thheller/shadow-cljs/issues/167 by using a separate nREPL (i.e. not the shadow-cljs nREPL), but then am I correct in thinking I need to hook that up to the shadow-cljs compiler to get correct reloading etc?

darwin22:07:13

@superstructor I’m afraid this would be very hard task. You would need to run shadow-cljs compiler in the same JVM as nREPL server with dirac middleware and then use shadow-cljs compiler env as input for cljs compilation in dirac middleware. I’ve done something like this with figwheel: https://github.com/binaryage/dirac/blob/master/docs/about-repls.md#dirac--figwheel https://github.com/binaryage/dirac/blob/master/src/nrepl/dirac/nrepl/figwheel.clj

darwin22:07:36

figwheel-sidecar.repl-api was easy enough to give me api to enumerate all compiler states and access to cljs compiler envs:

darwin22:07:33

I would bet shadow-cljs could offer something similar