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?
@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
figwheel-sidecar.repl-api
was easy enough to give me api to enumerate all compiler states and access to cljs compiler envs:
https://github.com/binaryage/dirac/blob/master/src/nrepl/dirac/nrepl/figwheel.clj#L45-L47
I would bet shadow-cljs could offer something similar