cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
j0ni 2020-08-18T09:50:00.053300Z

hey cider people, I'm seeing a completion error which is eventually debilitating - not 100% certain it's a cider thing, but I'm trying to narrow it down.

Lisp error: (error "Lisp nesting exceeds 'max-lisp-eval-depth'")
There's a trace here: https://gist.github.com/j0ni/53f215608190a3a8ae05dbc9af62a558 - it's doom emacs so I have a doom/info dump there as well

j0ni 2020-08-18T09:52:37.054600Z

the trace is a lot longer, because, well the error kind of explains - it's a recursive call which is causing it, so there's a lot of repetition

j0ni 2020-08-18T09:53:08.054900Z

Anyways, I'd appreciate any suggestions or ideas

ska 2020-08-18T10:25:51.056500Z

The trace contains no traces [sic] of cider as far as I can see. It looks like a combination of yasnippet and company that breaks. Maybe one of your YA snippets contains something that makes company kick in again or so? Just wildly and blindly shooting in the dark here.

j0ni 2020-08-18T10:36:12.058200Z

hmm, got no snippets and I removed the yasnippets module (a doom thing) - I did a bit more digging, and noticed that after about 30 seconds of not touching anything completion actually happens

j0ni 2020-08-18T10:36:18.058500Z

(company idle time is set to nil)

j0ni 2020-08-18T10:36:52.059300Z

same error happens on describe-key tab, but eventually it does describe (same wait)

j0ni 2020-08-18T10:37:13.059800Z

and tells me it is cider-repl-tab, which seems to resolve all the way to the correct default command... and yet

j0ni 2020-08-18T10:37:28.060200Z

so I'm guessing that this is a defadvice somewhere and I will continue to figure it out

j0ni 2020-08-18T10:38:23.061300Z

doom is an education, but I actually like it quite a lot. it has forced me to relearn my vi fu, but is sufficiently different to be a weird freak, but then, so am I, so ¯\(ツ)

j0ni 2020-08-18T10:38:46.061700Z

thanks for giving it brain time though, I appreciate it!

ska 2020-08-18T10:50:49.062100Z

Sorry for being able to really help with this.

j0ni 2020-08-18T10:53:03.062600Z

ah so not yasnippets - that's just in a cond, and it's not the clause which is executing

j0ni 2020-08-18T10:56:30.062900Z

it's evil bindings, is what it is

practicalli-john 2020-08-18T13:07:51.066700Z

I am trying to understand the purpose of the cider-restart command as it only restarts the connection to the REPL. Is it there solely to manage any issues Emacs has connecting to the external REPL process? I cant seem to find any other use for it. sesman-restart does a REPL restart and connects to the new REPL. cider-restart does not seem to clear the code evaluated in the REPL (cider-ns-refresh / reload that provides that functionality anyway). Just wondering if I was missing something. Thank you.

2020-08-18T16:44:12.070800Z

I’m using shadow-cljs for a ClojureScript project. I use shadow-cljs watch client, and I can use cider-connect-cljs to connect to the ClojureScript REPL — all good. Is there a way to also connect to the Clojure REPL that must also exist? (Something is doing macroexpansion.) I’ve tried the following: cider-connect-clj gives me “nrepl--direct-connect: [nREPL] Direct connection to localhost:nnnnn failed”. cider-connect-sibling-clj gives me “No clj REPLs in current session”. (I’m not really sure what a sibling is, FWIW, so no real idea whether that should do anything close to what I want.)

gon 2020-08-19T07:54:03.078500Z

In the shadow-cljs log you should have a line like this

shadow-cljs - nREPL server started on port 8777

gon 2020-08-19T07:55:37.078700Z

in the top level shadow-cljs.edn

:nrepl {:port       8777
         :middleware [refactor-nrepl.middleware/wrap-refactor]}

gon 2020-08-19T07:56:18.078900Z

which starts the nRepl server

2020-08-19T08:40:56.079100Z

Hmmm, I was missing that :middleware, so I’ve added it (and I’ve added [refactor-nrepl "2.5.0"] to the dependencies in my ~/.shadow-cljs/config.edn), but I still have the same behaviour. Is there something else I need?

2020-08-19T10:49:04.079300Z

Ah, I can get a CLJ and a CLJS REPL with cider-connect-clj&cljs.