Friends with Figwheel: https://github.com/binaryage/dirac/releases/tag/v0.7.0
@darwin so what do I need for this to work with figwheel? only sidecar
on the classpath?
I have a setup with dirac
already in place and although I prefer to eval in cider
...the lure of having good error messages might be what breaks my habit š
and if this work lambone
will include it as option to boot dev
btw lambone
aims to be Cursive+cider compatible..
@richiardiandrea this is what I did: https://github.com/binaryage/dirac-sample/blob/5ebcfbfb0ce3c7e66b66f5b32d894cc3e94894a1/project.clj#L132-L155
starting it with lein repl-figwheel
awesome thanks!
btw. I think that emacs + dirac + figwheel setup should be possible, the hard part would be to make nrepl middleware play together (if you use some advanced ones)
Iām assuming that emacs can connect to nREPL clojure session, so then it should be able to :join dirac session from within it
like Cursive
the more difficult part would be to get code completions and others bells and whistles working, Iām assuming that Cider is using various nREPL middleware to do that
@darwin isn't dirac replacing piggieback
completely?
yes
piggieback + weasel
but I can imagine you could be running diracās āweaselā and ciderās own client-side piece of code side-by-side
diracās weasel will be used for evals, and ciderās stuff for code completions or whatever they need to do on client-side
ah yeah if you add some kind of similar layer that's possible
Iām not familiar with cider and whole emacs stack, sorry
just saw this: https://github.com/binaryage/dirac-sample/blob/5ebcfbfb0ce3c7e66b66f5b32d894cc3e94894a1/project.clj#L92-L110
no problem I can investigate on that and report back, because it would be awesome and boot
/`lein` agnostic
yes it has a bunch of middleware for clj
but it also has some middleware for cljs, right?
which one?
just the cljs part is trickier, but tbh I am not that familiar with that as well
let's check š
clj-related middleware should not interfere with diracās, because dirac's is just rewritten piggieback with some cljs-related stuff added
yep true that, I am skimming in cider
if I were cider, knowing what I know now, I would provide just one middleware and all the stuff would be just inside cofigurable via options
this middleware list looks scary\
ahah
Iām afraid, this does not sound good enough to me, it will give you cljs autocompletions, but not javascript ones, also cljs env can differ from runtime state in the browser
I thought there is something which talks to browser to give you autocompletions
the real ones in the js env
btw. dirac is using sourcemaps machinery to map real existing javascript names back to cljs names
tons of work put into this by devtools devs, I think that is pretty advanced stuff no one else has
utimately this could be exposed to cider or cursive
but that is maybe going too far
yeah I think dirac has more sophisticated ways of fetching stuff
I see there the same util functions I use in replumb for self-host
using the classic compiler environment
so probably dirac
already provides more and we just need to find a way to talk back to cider...
if we do this, it is huuge, and it is going to only probably be yet another middleware š
that would be part of dirac middleware, I think š
so my next question would be, where to start digging ?
so cool ah ah...a cider
+`dirac`+`figwheel` setup would be my holy setup indeed
we are almost there, I think cursive + dirac + figwheel already works, but havenāt done any real work with this setup yet
and it is lein/boot agnostic I believe, because figwheel sidecar works with boot just fine
at least what I heard
yes there is boot-fighweel
indeed
so what is stopping you to: 1. setup your own nREPL server 2. add dirac middleware 3. add dirac agent 4. add fighweel-sidecar
then connect to it from emacs
and do (dirac! :join)
(dirac :ls)
should show you figwheel compiler as well, and you could (dirac! :switch)
to it
probably nothing, I have just never tried it, but I will...then I'll need to add cider
middleware in there...that's it...I have a deadline soon so I will try probably next weekend
ok, no hurry, I will probably have to test this config on some real work to see if it can fly
great, thanks for the chat, I'll report back!