Fork me on GitHub
#cider
<
2018-08-04
>
rhansen06:08:12

Anyone here have issues with datomic.ion.cast and cider?

bozhidar06:08:03

What kind of issues?

rhansen07:08:01

When calling (cast/initialize-redirect :stdout) so cast will output messages to stdout instead of ignoring the calls, my application crashes when calling said functions 😕

rhansen07:08:43

It only happens when using cider, and I haven't yet been able to see what exception get's thrown 😞

bozhidar07:08:33

It’s trivial to address and I’ll try to find some time for it later today.

bozhidar07:08:50

I’m already exhausted now after spending my entire morning working on wrapping

bozhidar07:08:27

So, yeah - mainline cider-nrepl 0.18 now support nREPL 0.4! That’s a very big success! partywombat

bozhidar07:08:54

Now someone has to do the same exercise for refactor-nrepl

rhansen08:08:59

Ahh, ok. There's no need to rush on my account. Get some well deserved rest 😃

bbss09:08:30

I restarted my shadow-cljs watch and I saw it downloaded a [cider-nrepl "0.18.0-SNAPSHOT"] dep, which I had previously installed locally. Now my cider-connect-cljs doesn't work anymore. I've tried updating my emacs cider dep and removing any cider packages and re-installing cider-nrepl from a fresh clone. After entering host+port+repl-type shadow I get asked which shadow build I want to use (as usual). But after that I don't see the repl switch to cljs as it used to do before. Any evals time out.

bozhidar10:08:02

I’ve cut a new snapshot. I tested only with 0.4 locally, that’s why I didn’t notice the problem.

bbss10:08:22

Okay, trying it! Thanks! 🚀

bbss10:08:53

That worked! Thanks @bozhidar

bozhidar10:08:27

You’re welcome! And sorry for the mess!

bbss10:08:52

That's okay. Risk of living on the 0.18.0 edge 😎

rhansen12:08:13

@bozhidar awesome! Does this mean that I just need to update my melpa packages and I should be all good?

bozhidar12:08:49

Only cider-nrepl snapshot from Clojars.

bozhidar12:08:05

There are no changes in CIDER itself (the Elisp code).

rhansen12:08:41

Okay. Thanks again!

soulflyer14:08:59

Getting problems with Cider. Trying to do a cider-jack-in starts a repl but throws an error like this:

2018-08-04 20:42:24,140 [clojure-agent-send-off-pool-5] ERROR clojure.tools.nrepl.server - Unhandled REPL handler exception processing message {:op init-debugger, :print-level 10, :print-length 10, :session 8dd8ceb1-2573-46d3-8f52-84ea5b8890f5, :id 8} 
clojure.lang.Compiler$CompilerException: java.lang.IllegalStateException: response-for already refers to: #'nrepl.misc/response-for in namespace: cider.nrepl.middleware.inspect, compiling:(cider/nrepl/middleware/inspect.clj:10:1)
This is with a luminus/swagger project that has been working fine for some time now. Just tried building a new one with lein new luminus +swagger +mongodband I get the same error. Could this be something to do with the recent changes to cider-nrepl?

soulflyer16:08:40

Looks like it is the latest cider-nrepl. I can start a repl via lein, and connect to it using cider-connect. This works, but complains about cider and cider-nrepl versions not matching. If I add this to profiles: :repl {:plugins [[cider/cider-nrepl "0.18.0-SNAPSHOT"]]} I get the error again and the repl won't start. Reverting to cider/cider-nrepl "0.17.0" makes the error go away.

michal19:08:31

yeah, the same here:

[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-apropos, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-classpath, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-complete, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-debug, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-enlighten, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-format, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-info, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-inspect, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-macroexpand, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-slurp, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-ns, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-out, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-content-type, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-slurp, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-pprint, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-pprint-fn, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-profile, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-refresh, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-resource, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-spec, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-stacktrace, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-test, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-trace, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-tracker, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-undef, see clojure.tools.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.nrepl/wrap-version, see clojure.tools.middleware/set-descriptor!

michal19:08:42

and lot of exceptions when trying to connect from emacs

michal19:08:10

something bad happened, guys

👍 1
michal19:08:18

@bozhidar that came with the latest snapshot of cider/cider-nrepl (0.18.0-SNAPSHOT). any clue where is the problem?

bozhidar20:08:55

Seems like some mismatch between the nREPL versions, but I can’t understand how something like this can be happening.

soulflyer00:08:33

Ok thanks. Seems to be working again now.

bozhidar20:08:14

Very simply put - after the most recent update cider-nrepl assumes you’re running nREPL 0.4.x unless it can find that clojure.tools.nrepl is loaded (which is true if you’re running lein repl or boot repl).

bozhidar20:08:40

I tested this both with lein repl and with clj and it seems to work fine.

bozhidar20:08:50

The middleware descriptor problems are a complete mystery - they imply that set-descriptor was set with the nREPL 0.4 function, but it’s trying to be resolved by nREPL 0.2, which should not be happening.

bozhidar20:08:48

Everyone’s welcome to go over this and check for irregularities.

pauld21:08:43

I get similar errors trying to jack-in to my clojurescript project. Here is the trace in my *nrepl-server buffer:

pauld21:08:12

It's a clojure tools cli project (deps.edn), using the figwheel-main template.

pauld21:08:35

result is after cider-jack-in-cljs + choosing figwheel-main

pauld21:08:16

I wasn't prompted for the build (ie :dev) this time.

bhauman21:08:46

@pauld try bumping up to figwheel-main 0.1.5

pauld21:08:06

also, I'm using spacemacs develop branch - in case that becomes relevant

pauld21:08:02

I'll try with a bare clojure tools cli project next.

lilactown21:08:35

my emacs just straight-up freezes (also using spacemacs develop) with cider-jack-in in brand new deps.edn project. I was able to stop it from freezing by removing refactor-nrepl.middleware/wrap-refactor from the startup params, now I get the same error as @pauld

pauld21:08:58

I guess the next step is to rule out spacemacs (it does some dependency injections of it's own).

lilactown21:08:04

removing the sayid middleware fixes it

lilactown21:08:45

adding the refactor (without the sayid middleware) middleware reintroduces the freeze

pauld21:08:51

ah, thanks - that one has broken my cider before

pauld21:08:12

how did you remove it?

lilactown21:08:46

I used SPACE u SPACE m ' to test it out

lilactown21:08:13

I think that the way to remove it is via the cider-jack-in-nrepl-middlewares var

lilactown21:08:44

is there a way to print the whole command that CIDER uses to start the nREPL process for cider-jack-in?

pauld21:08:20

it prints it to the messages buffer as far as I know

lilactown21:08:51

doesn’t help when my Emacs freezes though 😛 I don’t want to run it

lilactown21:08:54

ah I was quick enough to switch the buffers before I barfed 😉

pauld21:08:39

would reading .emacs.d/layers/+lang/clojure/packages.el help?

pauld21:08:18

in the past I deleted the sayid import at the top to stop it from loading sayid middleware

pauld21:08:46

everything the clojure layer does is in there I think

lilactown21:08:51

FYI to fix this in the interim I added this to dotspacemacs/user-config: (setq cider-jack-in-nrepl-middlewares '("cider.nrepl/cider-middleware"))

lilactown22:08:46

:thinking_face: that doesnt’ seem to be picked up on starting Emacs

pauld22:08:25

yeah, noticing this too

pauld22:08:05

<spc> f e R gets it working but <spc> q R (restarting) does not.

pauld22:08:28

probably needs to go in /init

lilactown22:08:47

that didn’t take either

pauld22:08:30

maybe in the layer configuration?

pauld22:08:22

(clojure :variables cider-jack-in-nrepl-middlewares '()

lilactown22:08:34

i’m not even sure where the variable gets set

lilactown22:08:39

ah. sayid and clj-refactor add themselves to the list

lilactown22:08:47

it looks like at least sayid has a `sayid-inject-dependencies-at-jack-in var you can set to nil

pauld22:08:54

my idea didn't work

lilactown22:08:04

okay. adding

;; sayid and refactor-nrepl are broken right now QQ
  (setq sayid-inject-dependencies-at-jack-in nil)
  (setq cljr-inject-dependencies-at-jack-in nil)
to my user-config worked

lilactown22:08:59

that was very frustrating

pauld22:08:29

Ok, can confirm it works!

pauld22:08:40

thanks! I wonder if these are only broken for us spacemacs develop users?

pauld22:08:20

sayid is part of the layer in develop only if I recall correctly

pauld22:08:19

I guess nobody using refactor-nrepl in regular emacs is complaining here yet

lilactown22:08:32

yeah, sayid seems to only be in the develop branch

lilactown22:08:59

I’m surprised that others aren’t having issues with clj-refactor but it is a weekend 😛

lilactown22:08:38

I feel like master also used an older version of CIDER?

lilactown22:08:51

but I can’t find any confirmation of that in the repo

pauld22:08:09

yeah, not sure they are even able to pin cider version easily

pauld22:08:46

i just read a long issue discussion about it

pauld22:08:29

only choice is to use MELPA-Stable but I don't think that comes pre configured

pauld22:08:23

Can a non-spacemacs user with sayid or refactor-nrepl in use confirm they are broken?

🙏 1