Fork me on GitHub
#cider
<
2018-10-13
>
bozhidar10:10:28

@borkdude Seems you’ve got some outdated middleware that’s not compatible with nREPL 0.4.

bozhidar10:10:37

Which CIDER version are you on?

bozhidar10:10:12

@pauld defalias can also help with this. I can hotpatch sesman, but I guess Vitalie will update CIDER soon.

bozhidar10:10:54

(I didn’t fix this directly myself as he made this function private and I’m not 100% what did he intend to replace it with)

borkdude11:10:29

@bozhidar this is my entire profile.boot:

(require 'boot.repl)

(swap! boot.repl/*default-dependencies*
       concat '[[cider/cider-nrepl "0.18.0"]
                [refactor-nrepl "2.4.0"]
                ])

(swap! boot.repl/*default-middleware*
       conj
       'cider.nrepl/cider-middleware
       'refactor-nrepl.middleware/wrap-refactor)

borkdude11:10:56

it works with boot 2.8.1 but not with 2.8.2

bozhidar11:10:18

@borkdude And what’s in your project?

borkdude11:10:36

no cider middleware

bozhidar11:10:50

Everything here seems fine and should definitely work with nREPL 0.4

borkdude11:10:16

hmm, I’ll check the deps tree

bozhidar11:10:49

There must be something, as what you’re experiencing can only be caused by something with a hard dep on tools.nrepl loading before CIDER’s middlewares.

bozhidar11:10:56

A few people reported issues like this one (e.g. https://github.com/clojure-emacs/cider/issues/2459) and always the problem was the same. 🙂

borkdude11:10:46

Thanks. It turns out we have a hard dependency on tools.nrepl somewhere. Should I upgrade to nrepl 0.4.5?

bozhidar11:10:11

Where’s this hard dep exactly?

bozhidar11:10:31

Generally tools.nrepl is dead and buried at this point and everyone should switch to nREPL 0.4.

borkdude11:10:56

I’m not even sure why we have it, it’s been there since ages… I’ll try to remove and see what happens 😉

bozhidar11:10:16

The only reason why cider’s middleware conditionally support tools.nrepl still is that Lein hasn’t yet issued a new version that uses nREPL 0.4.

bozhidar11:10:35

Boot was another holdout but they fixed this in 2.8.2 (therefore your current problem 😉 ).

borkdude12:10:54

problem solved now, project works with boot 2.8.1 and 2.8.2

borkdude12:10:48

hmm, one weirdness: when starting this project I get:

java.lang.Exception: No namespace: reply.eval-modes.nrepl found
but the repl seems to work fine

g17:10:13

hey guys and girls. is there any way to immediately break out of a deftest if an assertion fails (or some other condition occurs)?

g17:10:24

or rather, not a deftest but a running test

reefersleep19:10:14

Throw an exception? 😄