This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


Hi :slightly_smiling_face: How could I connect to cljs REPL when using Dirac? Figwheel standard way ( doesn't work because Dirac is a Piggieback middleware fork, so we cannot run both of them.

$ lein repl
user=> (require 'dirac.agent)
user=> (dirac.agent/boot!)
Dirac Agent v1.2.3
Connected to nREPL server at .
Agent is accepting connections at .
user=> (use 'figwheel-sidecar.repl-api)
user=> (start-figwheel!)
user=> (cljs-repl) ;; trying to get a REPL, got an exception instead because of missing Piggieback
From Emacs I've been trying:
> (cider-connect)
; Host: localhost
; Port 8231
;; [nREPL] Establishing direct connection to localhost:8231 ...
;; [nREPL] Direct connection established
;; progn: Sync nREPL request timed out (op clone id 1)


Thanks for your answer, I gonna read it


you can connect to an existing clojure nREPL server with dirac support loaded - then (dirac! :join) to join an existing dirac cljs REPL session


Cool! In Emacs I do (cider-jack-in) to launch a REPL then I enter (dirac! :version) but I got these error messages:

error in process filter: if: [nREPL] No response handler with id nil found
error in process filter: [nREPL] No response handler with id nil found
When I launch a REPL from the terminal it works like a charm:
$lein repl
user=> (dirac! :help)
;; You can control Dirac REPL via special `dirac` command:


@piotr2b I don’t use Emacs and I’m not familiar with CIDER, I’m sorry


AFAIK CIDER expects a bunch of its own middleware loaded in the nREPL server


Thanks anyway for your answers :slightly_smiling_face: I gonna ask #emacs.


depends what is your goal here, if you want to use CIDER for code completions, you should be able to setup a separate nREPL server with CIDER middleware and talk to it instead of the dirac-enabled-nREPL-server


for cljs code evaluations, you should talk to the dirac-enabled-nREPL-server via a joined session


Dirac middleware and CIDER cannot live together in one nREPL server, AFAIK


I found this line: Indeed I tried to do something like

:nrepl-middleware [dirac.nrepl/middleware
I know (thanks to the doc) that Piggieback mustn’t be use in conjunction will Dirac, but does this line suggest no other middlewares are tolerated by Dirac?


@piotr2b unexpected-middleware-msg is just a warning


some people mixed dirac middleware with other middleware and that caused unexpected errors


this is a way how to warn people that they might run into troubles


ok, thanks again for your answers :slightly_smiling_face: