Fork me on GitHub
#cider
<
2018-10-24
>
hlolli10:10:24

Is this cider error or error in my code

Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type")
  format("%26s:%5d  %s/%s" nil nil nil nil)
  cider-stacktrace-render-frame(#<buffer *cider-error*> nil)
  cider-stacktrace-render-cause(#<buffer *cider-error*> (dict "class" "java.lang.ClassCastException" "id" "25" "message" nil "session" "d697d375-105c-4302-ae23-85a964ca5c76" "stacktrace" (nil)) 1 "Unhandled")
  cider-stacktrace-render(#<buffer *cider-error*> ((dict "class" "java.lang.ClassCastException" "id" "25" "message" nil "session" "d697d375-105c-4302-ae23-85a964ca5c76" "stacktrace" (nil))) nil)
  cider--render-stacktrace-causes(((dict "class" "java.lang.ClassCastException" "id" "25" "message" nil "session" "d697d375-105c-4302-ae23-85a964ca5c76" "stacktrace" (nil))))
  cider--handle-stacktrace-response((dict "id" "25" "session" "d697d375-105c-4302-ae23-85a964ca5c76" "status" ("done")) ((dict "class" "java.lang.ClassCastException" "id" "25" "message" nil "session" "d697d375-105c-4302-ae23-85a964ca5c76" "stacktrace" (nil))))
  #f(compiled-function (response) #<bytecode 0x20da169>)((dict "id" "25" "session" "d697d375-105c-4302-ae23-85a964ca5c76" "status" ("done")))
  nrepl--dispatch-response((dict "id" "25" "session" "d697d375-105c-4302-ae23-85a964ca5c76" "status" ("done")))
  nrepl-client-filter(#<process nrepl-connection> "d2:id2:257:session36:d697d375-105c-4302-ae23-85a964ca5c766:statusl4:doneee")
code (reader error?)
(kick :loop "^5 0*2 0 0 10 0" -6 :rate [1 1 1 2 1] :fx [(freeverb)])

bozhidar10:10:19

@hlolli Are you on Clojure 1.10?

bozhidar10:10:31

Seems the stacktrace is not the in right format.

hlolli10:10:01

I'm on 1.9.0

bozhidar10:10:46

> format(“%26s:%5d %s/%s” nil nil nil nil)

bozhidar10:10:04

The error is that here you got a bunch of unexpected nils, but I’m not certain why.

hlolli10:10:43

I'm on the newest tools.deps, thinking if that overwrites my clojure version, I'm aware of all the stacktrace work on 1.10.0, so it would make sense it's being used, I'm cheking the classpath..

bozhidar10:10:38

@pri How do you start CIDER?

hlolli10:10:42

cider-jack-in, with profile addition and this stuff as well, I added few days ago

(cider-add-to-alist 'cider-jack-in-dependencies "cfft" "0.1.0")
(cider-add-to-alist 'cider-jack-in-dependencies "net.mikera/core.matrix" "0.62.0")
(cider-add-to-alist 'cider-jack-in-dependencies "rm-hull/markov-chains" "0.1.1")

hlolli10:10:27

dirlocal for this project

((nil
  (cider-clojure-cli-global-options . "-A:live")  ))

hlolli10:10:17

and it's for sure 1.9.0, the classpath from tools.deps indicates that

hlolli10:10:39

I think I know what caused it, but no idea why it caused it. I was requireing stuff, that blocks, and the throws error on timeout. I got timeout and still wen on evaluating. In that case, the error came. When it succeds, I don't get this. added: I realized not afterwards that you were pinging someone else with that quesiton 😄

pre16:10:44

@bozhidar cider-jack-in to start nrepl first before manually starting figwheel/cljs-repl in the nrepl. This was the behavior that worked for me for over 2.5 years.

bozhidar16:10:37

@pri Got it. Please, file a ticket about this.

bozhidar16:10:44

(generally the expectation is for people to use cider-jack-in-cljs, but if something was working for you and we broke it we should at least check if we broke something accidentally)

pre16:10:18

cider-jack-in-cljs never worked for me with figwheel.

bozhidar16:10:06

It should be working now. 🙂

bozhidar16:10:29

But I don’t much cljs outside of testing stuff for CIDER, so what do I know. 😄

pre16:10:45

It takes two minutes to test it out, Try 'lein new fighweel demo and start cider-jack-in-cljs and see yourself.

dpsutton16:10:11

worked for me

dpsutton16:10:53

lein new figwheel demo, i bumped the piggieback version to 3.9 from 3.1. cider-jack-in-cljs and chose figwheel from the list of options

dpsutton16:10:18

i'm on master probably from about 2 weeks ago or so. recent-ish

dpsutton16:10:02

i run a figwheel app for work every day and now have 2 other figwheel main apps. has been easy going for me. i'm sorry you are running into issues

pre16:10:31

I’m on cider 0.18 and I select figwheel after cider-jack-in-cljs and a repl opens with figwheel. But evaluating a form in cljs file throws “npo Cljs REPLs in current session”. You can’t even type (use 'figwheel-sidecar.repl-api) as it throws spec errors.

pre16:10:42

Maybe you have some magic in your local?

bozhidar16:10:01

@pri Likely you have an old version of piggieback?

pre16:10:15

I pasted my version above.

bozhidar16:10:18

This can mess up the REPL type detection logic. What are you currently using.

bozhidar16:10:36

Hmm, with this you should be solid.

dpsutton16:10:54

i didn't know 3.10 was out

bozhidar16:10:09

It’s recent and it can’t possibly break things.

bozhidar16:10:19

It just adds a couple of new cljs bindings that were missing.

dpsutton16:10:23

oh yeah. just musing.

dpsutton16:10:28

i need to follow along with that more

dpsutton16:10:57

@pri when you cider-jack-in-cljs do you see the repl type in the modeline as "pending-cljs"?

pre16:10:49

I don’t see anything in modeline but i can see the dropdown of options (this is new in 0,18, I think, and needlessly confusing). When I select figwheel i get “nrepl Direct connection to localshot… established” and a fighweel repl opens.

pre16:10:38

Can you confirm if you’re using 0.18 master (not snapshot?) and Jvm/figwheel/piggieback version

dpsutton16:10:53

i'm tracking master but not completely up to date. figwheel 5.16, piggieback 3.9 and jvm 1.8

pre16:10:15

So you’re not testing on 0.,18 release.

dpsutton16:10:37

no i have a local copy of the repo

pre17:10:03

Perhaps you shouldn’t say ’it works for me” then 🙂 I have a linux and a mac and confirm that on a fresh fighweel demo project cider-jack-in-cljs in cider 0.17 opens up a fighweel cljs repl and I can evaluate forms in all three files (clj/cljc/cljs). The same doesn’t work in cider 0.18. Besides there are other issues with 0,.18 that make it unsuable (killing buffers will not restart repls).

dpsutton17:10:33

sorry to waste your time 🙂

pre17:10:51

Does anyone else find these issues and would you recommed downgrading to 0.17?

pre17:10:47

I appreciate your time @dpsutton, just saying that I had a detailed explanation of my error with all versions listed and steps to recreate.

pre17:10:44

I made some progress: Upgraded to cider 0.19-Snapshot (20181024.1017). Starting cider-jack-in-clj-&-cljs now opens clj and cljs repls; figwheel starts successfully and opens its repl and I can eval cljs forms. However evaluating clj still says “no clj repls in current session”. Suggestions?

richiardiandrea20:10:33

having all sorts of problems today - not even cider-mode gets assigned to my buffer ...might be unlucky day lol

richiardiandrea20:10:54

which part of cider assigns cider-mode?

richiardiandrea20:10:15

do I have to put in my auto-mode-alist?

bozhidar22:10:20

@pri What do you see if you do “Sesman -> Show Session Info”?

bozhidar22:10:54

@richiardiandrea jack-in/connect would normally enable cider-mode after a connection is established.

richiardiandrea22:10:18

yeah that does not happen to me in shadow I guess

richiardiandrea22:10:49

will try to debug in which case it does/does not

richiardiandrea22:10:25

today I am having some tooling fatigue actually... 😓 ...I might just need a break

pre22:10:32

@bozhidar git/demo:localhost:50515 [*cider-repl %s(pending-cljs)*, *cider-repl %s(cljs)*] linked-to proj(~/git/demo/)

pre22:10:02

I was able to workaround the issue by reconnecting the clj source to clj repl; this should be connected by default (the bug)

pre22:10:25

i believe the introduction of sesman caused multiple bugs in 0.18