Fork me on GitHub
#cider
<
2021-01-27
>
csgero15:01:03

looks like the latest changes in orchard around the classloader broke namespace refreshing

csgero15:01:23

cider-ns-refresh doesn’t refresh anything

csgero15:01:34

I tracked it down to (clojure.java.classpath/classpath-directories) returning an empty list

csgero15:01:04

reverting to cider 0.25.5 fixes the issue

Derek18:01:56

Is there a size limit to the inspect feature? As in above a certain size, inspect will consider it a string?

Eamonn Sullivan18:01:29

Good evening/afternoon/morning. In the last few days, I've started to see stack traces showing up in the REPL as I'm typing in the source buffer. They seem to be coming from attempts to understand what I'm typing. I had not seen these before. For example, I start typing (defprotocol SomeComponent... and the REPL will show a big red stack trace that starts with something like ERROR: Unhandled REPL handler exception processing message {:op eldoc, :ns my.component-lib, :sym SomeComponent, :session bbb91b00-f76e-43ea-9a63-ab68b1ab39f0, :id 95}... . I'm running in emacs 28.0.50 (the native compilation branch) with straight.el (so the main branch of everything), which often means I see issues earlier than most. But I don't know where to start looking. Cider says it's running:

;; Connected to nREPL server - 
;; CIDER 1.1.0snapshot, nREPL 0.8.3
;; Clojure 1.10.2, Java 1.8.0_282
Any ideas where I can start looking? The eldoc in the stack trace might be a clue, I guess.

Eamonn Sullivan18:01:06

It does seem to happen every time I'm typing an (as yet) undefined symbol, but I don't think I should be seeing the stack trace when eldoc can't recognise the symbol.

Eamonn Sullivan18:01:32

Ah, I think these might related to eldoc-mode, which I have turned on in Clojure buffers. If I turn it off, they stop.

Eamonn Sullivan18:01:55

I have something like the following in my emacs config, which I probably copied from the cider docs a long time ago...

(use-package
  cider
  :hook ((clojure-mode . turn-on-eldoc-mode)
         (clojure-mode . cider-mode))

Eamonn Sullivan18:01:00

This might also be helpful:

;;  Startup: /home/linuxbrew/.linuxbrew/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.3"} refactor-nrepl {:mvn/version "2.5.0"} cider/cider-nrepl {:mvn/version "0.25.8"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[\"refactor-nrepl.middleware/wrap-refactor\",\"cider.nrepl/cider-middleware\"]"]}}}' -M:cider/nrepl

Eamonn Sullivan18:01:18

Even if I remove that hook, eldoc mode seems to be enabled automatically? Is that right? I have to turn it off explicitly.

stuartrexking03:01:40

I haven’t tried 0.25.8. I’m using 0.25.6.

Eamonn Sullivan06:01:28

Ah, yikes, sorry. I didn’t see the earlier conversation. I wonder why I’m still getting this in 25.8, though. :thinking_face: