Fork me on GitHub
#cider
<
2022-12-05
>
cjohansen10:12:20

A colleague just upgraded cider to <tel:202212031148|20221203.1148> and now can’t start the REPL. I have <tel:202111032049|20211103.2049> and can start the REPL from the same project just fine. We have nrepl/nrepl {:mvn/version "0.8.3"} in our deps.edn, but nothing else cider/nrepl-related. In my Emacs, this ends up running:

/opt/homebrew/bin/clojure -A:dev:test -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0-beta3"} refactor-nrepl/refactor-nrepl {:mvn/version "3.1.0"} cider/cider-nrepl {:mvn/version "0.27.2"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
He’s Emacs runs this command on jack in:
/opt/homebrew/bin/clojure -A:dev:test -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.28.7"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
This fails due to missing refactor-nrepl-stuff, which is no surprise given that refactor-nrepl isn’t included in the command. Why is refactor-nrepl included in my startup command and not in his? :thinking_face:

anders11:12:02

A workaroud is having your colleague do (cider-add-to-alist 'cider-jack-in-dependencies "refactor-nrepl/refactor-nrepl" "3.1.0")

😂 1
cjohansen11:12:26

I’ll be sure to let him know 😅

vemv14:12:56

cider and clj-refactor.el should be upgraded simultaneously - if using both. if you happen to not be interested in clj-refactor, then remove it from your setup so that refactor-nrepl will not be injected

cjohansen14:12:41

we are interested in clj-refactor, I guess the confusion was around where it was coming from

Drew Verlee19:12:27

i added a new require to my namespace, and evaled it, but i'm not getting auto complete on that ns. Is there anything more i have to do? Is there such a function as cider-refresh-dynamic-completions-in-current-ns` or is chatGPT just making things up?

dpsutton20:12:13

you can use m-x find-function to find out

👍 1
vemv20:12:53

you might have clojure-lsp mixed in with cider? The former is not affected by the load ed environment

Drew Verlee21:12:54

Yep, i did check find-function. i guess i should have asked, did it ever exist. But it seems the answer is no. I guess i'm back to programing the old fashion way for the time being!

dpsutton21:12:46

no worries. i mentioned find-function so you know about that functionality. It wasn’t meant to be passive aggressive but to indicate how to answer your question

Drew Verlee21:12:38

I didn't take it as such, my question was lazy, it assumed readers had a lot more context. At the moment i was in shock that the AI lied to me and then defended its lie.

Drew Verlee21:12:17

it told me that function used to exist.

dpsutton21:12:10

gpt answers are banned from stack overflow right now because they sound good but are just gibberish

dpsutton21:12:17

i think you might have gotten one of those.

👍 1
Patrick Winter21:12:12

How do I reset all breakpoints after instrumentig code with cider-debug-defun-at-point? (I've tried to reavluate with cider-eval-last-sexp , but on execution I still get a debug prompt)

dpsutton21:12:00

just re-evaluate the form(s)

Patrick Winter21:12:25

Hmm, I've tried that but I still entered the debug prompt. Let me restart the REPL and see if it happens again.

Patrick Winter21:12:38

Okay, now it works. No idea what the problem was 🙂. Thank you @U11BV7MTK

dpsutton21:12:09

maybe you reevaluated the whole namespace and another function had taken the instrumented function rather than just the var

George06:12:36

I think you need to re-eval with C-M-x to reset. C-x C-e won't do it afaik.