Fork me on GitHub
#cider
<
2017-02-17
>
renewdoit02:02:47

Bug report : from clojurescript 1.9.456 onward, the destructure of map malfunctioned just in cider REPL, like this: (let [{a :a} {:a 3}] a in REPL, it returns nil in 1.9.229 it works as expected

hans07:02:13

Hi! I keep seeing

error in process filter: [nREPL] Direct connection failed
when using M-x cider-jack-in. I've always had this problem, but most of the times it just went away when I try to jack in once more. On the machine I'm working on now, though, it takes many attempts until I get a repl running. It seems that there is a lingering bug somewhere deep down, what can I do to help tracking it down?

rmuslimov09:02:47

Q: I have both repls in project (CLJ and CLJS). Where is the setting which will force using CLJS repl for .cljc files? Or it is not configurable now?

rmuslimov09:02:38

Ok hacking cider internals helped.

+++ (setq cider-use-clj-repl-for-cljs nil)

   (defun cider-connection-type-for-buffer ()
     "Return the matching connection type (clj or cljs) for the current buffer.”
     (cond
+++   ((derived-mode-p 'clojurec-mode) (if cider-use-clj-repl-for-cljs "clj" “cljs”))
      ((derived-mode-p 'clojurescript-mode) “cljs”)
      ((derived-mode-p 'clojure-mode) “clj”)
      (cider-repl-type)
      (t "clj")))
If anyone know better way to same thing, please share

pesterhazy11:02:03

@hans, much better to open the repl in a separate terminal window, then cider-connect

pesterhazy11:02:36

then you see all the problems pop up in the terminal window

pesterhazy11:02:16

plus it's always a good idea to check the *cider nrep... buffer

hans13:02:23

@pesterhazy I like to see problems pop up in the *cider-nrepl* buffer, and I like to work from within emacs rather than having a separate terminal window open.

hans13:02:55

@pesterhazy Like, I would like to help fixing this bug rather than changing how I work to work around it.

pesterhazy14:02:03

and that's a good idea. To debug, I would run the repl in a separate terminal window and see if that works 🙂

hans14:02:50

that works.

pesterhazy14:02:52

and you can connect from cider?

pesterhazy14:02:22

ok so in all probability there's a difference between the way cider starts lein/boot and the way you start it manually

pesterhazy14:02:44

or maybe it just takes too long and cider gives up?

hans14:02:56

There are no error messages in the nrepl buffer. And if I repeat the attempt often enough, it succeeds. It has been a problem for years, really.

pesterhazy14:02:36

if you suspect something is wrong with your cider, you could try deleting all cider related packages from ~/.emacs.d/elpa and restart

hans14:02:51

It has been a problem on all kinds of different systems.

pesterhazy14:02:57

it could also be about the cider middleware used

pesterhazy14:02:07

perhaps related to your lein profile

hans15:02:58

Right. What I would really like is advice how I can find out what actually happens.