This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-31
Channels
- # beginners (57)
- # boot (25)
- # cider (86)
- # cljs-dev (6)
- # clojure (137)
- # clojure-russia (7)
- # clojure-spec (10)
- # clojure-turkiye (1)
- # clojure-uk (47)
- # clojurescript (37)
- # cursive (10)
- # datascript (2)
- # datomic (2)
- # dirac (59)
- # emacs (1)
- # hoplon (46)
- # instaparse (122)
- # om (32)
- # om-next (1)
- # onyx (3)
- # pedestal (2)
- # perun (4)
- # protorepl (6)
- # re-frame (15)
- # reagent (60)
- # rum (4)
- # specter (7)
- # sql (3)
- # untangled (3)
- # yada (4)
There is one thing I was wondering about. Everything is working fine in the Chrome Devtools, but am I also supposed to be able to reuse my Cider REPL to interact with the browser?
if you are dependent on piggieback middleware it might not work, because dirac middleware replaces it
I only briefly tested that it does not conflict with cider middleware: https://github.com/binaryage/dirac-sample/blob/master/project.clj#L92
I use chrome devtools most of the time, but you could try something like this with Emacs: https://github.com/binaryage/dirac/blob/master/docs/integration.md
it should work in theory, I’m just not sure if you could get some more advanced things out of it, I’m assuming cider uses piggieback to eval stuff in cljs
When I type the dirac! command it produces error in process filter: nrepl--dispatch-response: [nREPL] No response handler with id nil found
I have this: (swap! boot.repl/*default-middleware* conj 'dirac.nrepl/middleware)
in my build.boot
`
But I need to connect to port 8230 directly, or does the middleware reroute the commands?
you should connect normal nREPL client to 8230, you get normal Clojure REPL session, if dirac middleware is present and working, it should recognise the dirac!
command
I remember that I managed to do the same from the cider REPL client. But it doesn't seem to work anymore.
my theory with your cider setup: some cider middleware gets to process nREPL messages before dirac middleware, that means it eats (dirac! …)
messages, and fails on them for whatever reason
easy solution would be to make sure that your middleware list includes dirac first and then all cider stuff, if possible
also dirac middleware relies on standard session
and ieval
middlewares, which are included by default, if cider tries to change this, it could confuse dirac
It seems that these are the loaded middleware: cider.nrepl/cider-middleware, refactor-nrepl.middleware/wrap-refactor and dirac.nrepl/middleware
OK, this is the order now: dirac.nrepl/middleware, cider.nrepl/cider-middleware and refactor-nrepl.middleware/wrap-refactor
so it is not piggieback, piggieback would quit cljs REPL and exit into “shell” clojure REPL
you should somehow tell cider to connect to standard clojure nREPL session and don’t do anything more