cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
jumar 2021-02-26T07:58:47.037300Z

No it doesn’t; only mouse click

enn 2021-02-26T14:36:37.040Z

Good morning CIDER folks. We recently switched from using lein to using clojure-cli, and I’m having trouble getting CIDER to be functional. I have limited interaction with the REPL, but C-c C-c , C-c C-k, running tests, etc., are not working, and when I try I get exceptions from the middleware in the REPL. Full stacktrace in thread.

enn 2021-02-26T14:37:11.040100Z

ERROR: Unhandled REPL handler exception processing message {:nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print clubhouse.dev-helpers.helpers/entity-map-aware-pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/buffer-size 4096, :nrepl.middleware.print/options {:right-margin 70}, :op stacktrace, :session 3c2e42be-90d9-4a51-b1a2-7a7dd7f1bdb7, :id 9}
java.lang.ClassNotFoundException: com.sun.tools.javac.util.List
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at clojure.lang.RT.classForName(RT.java:2212)
	at clojure.lang.RT.classForName(RT.java:2221)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java.legacy_parser$parse_java.invokeStatic(legacy_parser.clj:88)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java.legacy_parser$parse_java.invoke(legacy_parser.clj:66)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java.legacy_parser$source_info.invokeStatic(legacy_parser.clj:274)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java.legacy_parser$source_info.invoke(legacy_parser.clj:265)
	at clojure.lang.Var.invoke(Var.java:384)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$source_info.invokeStatic(java.clj:144)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$source_info.invoke(java.clj:139)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$class_info_STAR_.invokeStatic(java.clj:223)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$class_info_STAR_.invoke(java.clj:214)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$class_info.invokeStatic(java.clj:261)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$class_info.invoke(java.clj:253)
	at clojure.core$comp$fn__5826.invoke(core.clj:2573)
	at clojure.lang.Iterate.first(Iterate.java:47)
	at clojure.lang.RT.first(RT.java:692)
	at clojure.core$first__5402.invokeStatic(core.clj:55)
	at clojure.core$take_while$fn__5936.invoke(core.clj:2910)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__5420.invokeStatic(core.clj:139)
	at clojure.core$filter$fn__5912.invoke(core.clj:2813)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:58)
	at clojure.lang.LazySeq.first(LazySeq.java:73)
	at clojure.lang.RT.first(RT.java:692)
	at clojure.core$first__5402.invokeStatic(core.clj:55)
	at clojure.core$first__5402.invoke(core.clj:55)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$member_info.invokeStatic(java.clj:306)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$member_info.invoke(java.clj:295)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$resolve_member$fn__74683.invoke(java.clj:349)
	at clojure.core$map$fn__5885.invoke(core.clj:2759)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__5420.invokeStatic(core.clj:139)
	at clojure.core$filter$fn__5912.invoke(core.clj:2813)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:58)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.lang.RT.nthFrom(RT.java:982)
	at clojure.lang.RT.nth(RT.java:940)
	at clojure.core$distinct$step__6430$fn__6431$fn__6433.invoke(core.clj:5037)
	at clojure.core$distinct$step__6430$fn__6431.invoke(core.clj:5037)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__5420.invokeStatic(core.clj:139)
	at clojure.core$seq__5420.invoke(core.clj:139)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$resolve_symbol.invokeStatic(java.clj:374)
	at cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$resolve_symbol.invoke(java.clj:357)
	at <http://cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.info|cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.info>$clj_meta.invokeStatic(info.clj:76)
	at <http://cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.info|cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.info>$clj_meta.invoke(info.clj:65)
	at <http://cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.info|cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.info>$info_STAR_.invokeStatic(info.clj:147)
	at <http://cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.info|cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.info>$info_STAR_.invoke(info.clj:136)
	at cider.nrepl.middleware.stacktrace$analyze_fn.invokeStatic(stacktrace.clj:78)
	at cider.nrepl.middleware.stacktrace$analyze_fn.invoke(stacktrace.clj:63)
	at clojure.core$comp$fn__5826.invoke(core.clj:2573)
	at clojure.core$comp$fn__5826.invoke(core.clj:2573)
	at clojure.core$comp$fn__5826.invoke(core.clj:2573)
	at cider.nrepl.middleware.stacktrace$analyze_frame.invokeStatic(stacktrace.clj:180)
	at cider.nrepl.middleware.stacktrace$analyze_frame.invoke(stacktrace.clj:177)
	at clojure.core$map$fn__5885.invoke(core.clj:2759)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__5420.invokeStatic(core.clj:139)
	at clojure.core$map$fn__5889.invoke(core.clj:2761)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.RT.next(RT.java:713)
	at clojure.core$next__5404.invokeStatic(core.clj:64)
	at clojure.core.protocols$fn__8183.invokeStatic(protocols.clj:169)
	at clojure.core.protocols$fn__8183.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__8138$G__8133__8147.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__8170.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__8170.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__8112$G__8107__8125.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6833)
	at clojure.core$into.invokeStatic(core.clj:6900)
	at clojure.core$mapv.invokeStatic(core.clj:6908)
	at clojure.core$mapv.invoke(core.clj:6908)
	at cider.nrepl.middleware.stacktrace$flag_duplicates.invokeStatic(stacktrace.clj:175)
	at cider.nrepl.middleware.stacktrace$flag_duplicates.invoke(stacktrace.clj:164)
	at cider.nrepl.middleware.stacktrace$analyze_stacktrace.invokeStatic(stacktrace.clj:186)
	at cider.nrepl.middleware.stacktrace$analyze_stacktrace.invoke(stacktrace.clj:182)
	at cider.nrepl.middleware.stacktrace$analyze_cause.invokeStatic(stacktrace.clj:290)
	at cider.nrepl.middleware.stacktrace$analyze_cause.invoke(stacktrace.clj:281)
	at cider.nrepl.middleware.stacktrace$analyze_causes$fn__75190.invoke(stacktrace.clj:315)
	at clojure.core$map$fn__5881$fn__5882.invoke(core.clj:2746)
	at clojure.core$take_while$fn__5932$fn__5933.invoke(core.clj:2905)
	at clojure.lang.Iterate.reduce(Iterate.java:81)
	at clojure.core$transduce.invokeStatic(core.clj:6888)
	at clojure.core$into.invokeStatic(core.clj:6904)
	at clojure.core$into.invoke(core.clj:6892)
	at cider.nrepl.middleware.stacktrace$analyze_causes.invokeStatic(stacktrace.clj:314)
	at cider.nrepl.middleware.stacktrace$analyze_causes.invoke(stacktrace.clj:306)
	at cider.nrepl.middleware.stacktrace$handle_stacktrace.invokeStatic(stacktrace.clj:323)
	at cider.nrepl.middleware.stacktrace$handle_stacktrace.invoke(stacktrace.clj:320)
	at clojure.lang.Var.invoke(Var.java:388)
	at cider.nrepl$wrap_stacktrace$fn__2117.invoke(nrepl.clj:417)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_clojuredocs$fn__2175.invoke(nrepl.clj:511)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_undef$fn__2149.invoke(nrepl.clj:478)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_info$fn__2043.invoke(nrepl.clj:203)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_slurp$fn__1985.invoke(nrepl.clj:117)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_macroexpand$fn__2061.invoke(nrepl.clj:272)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at nrepl.middleware.interruptible_eval$interruptible_eval$fn__1024.invoke(interruptible_eval.clj:154)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at nrepl.middleware.load_file$wrap_load_file$fn__1490.invoke(load_file.clj:81)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at nrepl.middleware.session$add_stdin$fn__1140.invoke(session.clj:363)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_content_type$fn__1977.invoke(nrepl.clj:105)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at nrepl.middleware.sideloader$wrap_sideloader$fn__1577.invoke(sideloader.clj:104)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_out$fn__2077.invoke(nrepl.clj:319)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_debug$fn__2019.invoke(nrepl.clj:159)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_enlighten$fn__2027.invoke(nrepl.clj:185)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_inspect$fn__2053.invoke(nrepl.clj:222)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at nrepl.middleware.caught$wrap_caught$fn__959.invoke(caught.clj:97)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_refresh$fn__2093.invoke(nrepl.clj:365)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at nrepl.middleware.print$wrap_print$fn__926.invoke(print.clj:234)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at cider.nrepl$wrap_tracker$fn__2141.invoke(nrepl.clj:467)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at nrepl.middleware.completion$wrap_completion$fn__1458.invoke(completion.clj:50)
	at nrepl.middleware$wrap_conj_descriptor$fn__690.invoke(middleware.clj:16)
	at nrepl.middleware.session$session$fn__1125.invoke(session.clj:309)

enn 2021-02-26T14:37:34.040300Z

(that’s actually not the full thing but I’m hitting Slack limits trying to post it all)

enn 2021-02-26T14:38:06.040500Z

My ~/.clojure/deps.edn is:

{
 :aliases
 {:cider
  {:extra-deps {cider/cider-nrepl {:mvn/version "0.25.9"}}
   :main-opts  ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}
 }

enn 2021-02-26T14:38:38.040700Z

M-x cider-version yields: “CIDER 1.1.0snapshot (package: <tel:202102131151|20210213.1151>)”

enn 2021-02-26T14:38:58.040900Z

Any thoughts on what might be going wrong?

dpsutton 2021-02-26T14:52:52.042700Z

I think there’s a ticket about this. It’s not finding the sun util list class. Which jvm are you on and do you switch jvms with a manager or something?

enn 2021-02-26T14:53:33.042900Z

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)

enn 2021-02-26T14:54:42.043100Z

I don’t have any manager. That makes sense, though I’m not sure why I didn’t run into this with leiningen using the same JVM. Maybe lein packages tools.jar itself or something?

enn 2021-02-26T15:01:28.043300Z

I take that back--I guess there is some kind of version management done implicitly by MacOS based on the value of $JAVA_HOME.

dpsutton 2021-02-26T15:03:46.043500Z

https://github.com/nrepl/nrepl/issues/206 https://github.com/clojure-emacs/orchard/issues/105 might point at some info

dpsutton 2021-02-26T15:04:19.043900Z

one person downgraded nrepl and another downgraded CIDER. that downgrade of CIDER might have worked because of a lower version of nrepl

enn 2021-02-26T18:06:01.044200Z

thank you, downgrading cider-nrepl to 0.25.7 seems to have fixed that specific error (which I think related to printing exceptions) I’m still seeing this other category of error, related to getting docstrings I think:

ERROR: Unhandled REPL handler exception processing message {:op eldoc, :ns clubhouse.job-executor.jobs.search-index-workspace, :sym run, :session c15dbb92-7c6c-4da9-bf7b-98c62e8a8f9d, :id 21}
java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to java.lang.ClassLoader
	at cider.nrepl.inlined_deps.orchard.v0v6v3.orchard.java.classpath$classloaders$fn__74135.invoke(classpath.clj:29)
	at clojure.lang.Iterate.first(Iterate.java:47)
	at clojure.lang.RT.first(RT.java:692)
	at clojure.core$first__5402.invokeStatic(core.clj:55)
	at clojure.core$take_while$fn__5936.invoke(core.clj:2910)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__5420.invokeStatic(core.clj:139)
	at clojure.core$filter$fn__5912.invoke(core.clj:2813)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:58)
	at clojure.lang.LazySeq.next(LazySeq.java:80)
	at clojure.lang.RT.next(RT.java:713)
	at clojure.core$next__5404.invokeStatic(core.clj:64)
	at clojure.core$last__5446.invokeStatic(core.clj:270)
	at clojure.core$last__5446.invoke(core.clj:269)
	at cider.nrepl.inlined_deps.orchard.v0v6v3.orchard.java.classpath$modifiable_classloader.invokeStatic(classpath.clj:38)
	at cider.nrepl.inlined_deps.orchard.v0v6v3.orchard.java.classpath$modifiable_classloader.invoke(classpath.clj:34)
	at cider.nrepl.inlined_deps.orchard.v0v6v3.orchard.java.classpath$add_classpath_BANG_.invokeStatic(classpath.clj:75)
	at cider.nrepl.inlined_deps.orchard.v0v6v3.orchard.java.classpath$add_classpath_BANG_.invoke(classpath.clj:69)

richiardiandrea 2021-02-26T18:30:10.045Z

Hi there, does anybody know what I am missing for having #break working? I am getting:

#error {
 :cause "Attempting to call unbound fn: #'cider.nrepl.middleware.debug/breakpoint-reader"
 :via
 [{:type clojure.lang.Compiler$CompilerException
   :message "Syntax error reading source at (com/cohesic/acuity/infra2/tables/diagnostic_reports.clj:222:0)."
   :data #:clojure.error{:phase :read-source, :line 222, :column 0, :source "com/cohesic/acuity/infra2/tables/diagnostic_reports.clj"}
   :at [clojure.lang.Compiler load "Compiler.java" 7643]}
  {:type java.lang.IllegalStateException
   :message "Attempting to call unbound fn: #'cider.nrepl.middleware.debug/breakpoint-reader"

richiardiandrea 2021-02-26T18:30:42.045100Z

but

=&gt; (require 'cider.nrepl.middleware.debug)
nil
works

richiardiandrea 2021-02-26T18:33:31.045400Z

uhm ok I might be missing this https://github.com/clojure-emacs/cider-nrepl/blob/master/src/data_readers.clj

richiardiandrea 2021-02-26T18:35:28.045700Z

next step, this exists:

(io/resource "data_readers.clj")
#object[java.net.URL 0x6538fcf3 "jar:file:/home/cokap/.m2/repository/cider/cider-nrepl/0.25.7/cider-nrepl-0.25.7.jar!/data_readers.clj"]