This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-05
Channels
- # architecture (2)
- # aws (1)
- # bangalore-clj (4)
- # beginners (97)
- # boot (35)
- # cider (8)
- # cljsjs (3)
- # cljsrn (35)
- # clojure (190)
- # clojure-dusseldorf (4)
- # clojure-italy (7)
- # clojure-poland (1)
- # clojure-russia (17)
- # clojure-spec (74)
- # clojure-uk (30)
- # clojureremote (2)
- # clojurescript (298)
- # code-reviews (18)
- # component (18)
- # cursive (18)
- # datascript (3)
- # datavis (2)
- # datomic (24)
- # dirac (17)
- # emacs (3)
- # garden (7)
- # hoplon (51)
- # jobs (2)
- # jobs-rus (2)
- # leiningen (4)
- # luminus (11)
- # mount (24)
- # off-topic (1)
- # om (32)
- # onyx (25)
- # pedestal (1)
- # powderkeg (9)
- # protorepl (6)
- # re-frame (11)
- # reagent (15)
- # spacemacs (6)
- # sql (35)
- # uncomplicate (1)
- # unrepl (74)
- # untangled (130)
- # yada (6)
Hi 🙂 How could I connect to cljs REPL when using Dirac? Figwheel standard way (https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl) 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)
hm, have you tried to look here? https://github.com/binaryage/dirac/blob/master/docs/integration.md
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:
Thanks anyway for your answers 🙂 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
here is a schema how dirac works internally: https://github.com/binaryage/dirac/blob/master/docs/about-repls.md#dirac
I found this line: https://github.com/binaryage/dirac/blob/90ddd0f0c47a8d952be902d891e80d81e2cd4556/src/lib/dirac/lib/nrepl_tunnel.clj#L78 Indeed I tried to do something like
:nrepl-middleware [dirac.nrepl/middleware
cider.nrepl.middleware.apropos/wrap-apropos
…]
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?some people mixed dirac middleware with other middleware and that caused unexpected errors
ok, thanks again for your answers 🙂