Skip to content

Instantly share code, notes, and snippets.

@mk
Created May 9, 2022 15:12
Show Gist options
  • Save mk/bd82092048d733ef3de0e312898f47b4 to your computer and use it in GitHub Desktop.
Save mk/bd82092048d733ef3de0e312898f47b4 to your computer and use it in GitHub Desktop.
nrepl classpath-namespaces issue
{:paths ["."]}
(ns foo)
(comment
;; run the following expr and see that you don't see an error but an exception
(throw (ex-info "boom" {})))
;; this is an invalid ns declaration that will trip up classpath-namespaces
(ns (:require [clojure.string]))
Execution error (ExceptionInfo) at foo/eval5819 (REPL:5).
boom
ERROR: Unhandled REPL handler exception processing message {:op stacktrace, :nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/buffer-size 4096, :nrepl.middleware.print/options {:right-margin 70}, :session cb3f6d50-4093-4e24-87f3-27a93a1b6f98, :id 13}
java.lang.ClassCastException: class clojure.lang.PersistentList cannot be cast to class java.lang.Comparable (clojure.lang.PersistentList is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')
java.lang.ClassCastException: class clojure.lang.PersistentList cannot be cast to class java.lang.Comparable (clojure.lang.PersistentList is in unnamed module of loader 'app'; java.lang.Comparable is in module java.base of loader 'bootstrap')
at clojure.lang.Util.compare(Util.java:153)
at clojure.core$compare.invokeStatic(core.clj:842)
at clojure.core$compare.invoke(core.clj:833)
at clojure.lang.AFunction.compare(AFunction.java:51)
at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
at java.base/java.util.TimSort.sort(TimSort.java:220)
at java.base/java.util.Arrays.sort(Arrays.java:1233)
at clojure.core$sort.invokeStatic(core.clj:3116)
at clojure.core$sort.invokeStatic(core.clj:3103)
at clojure.core$sort.invoke(core.clj:3103)
at cider.nrepl.inlined_deps.orchard.v0v9v2.orchard.namespace$classpath_namespaces.invokeStatic(namespace.clj:123)
at cider.nrepl.inlined_deps.orchard.v0v9v2.orchard.namespace$classpath_namespaces.invoke(namespace.clj:114)
at cider.nrepl.inlined_deps.orchard.v0v9v2.orchard.namespace$project_namespaces.invokeStatic(namespace.clj:135)
at cider.nrepl.inlined_deps.orchard.v0v9v2.orchard.namespace$project_namespaces.invoke(namespace.clj:127)
at cider.nrepl.middleware.stacktrace$directory_namespaces.invokeStatic(stacktrace.clj:132)
at cider.nrepl.middleware.stacktrace$directory_namespaces.invoke(stacktrace.clj:122)
at cider.nrepl.middleware.stacktrace$analyze_stacktrace.invokeStatic(stacktrace.clj:216)
at cider.nrepl.middleware.stacktrace$analyze_stacktrace.invoke(stacktrace.clj:213)
at cider.nrepl.middleware.stacktrace$analyze_cause.invokeStatic(stacktrace.clj:323)
at cider.nrepl.middleware.stacktrace$analyze_cause.invoke(stacktrace.clj:314)
at cider.nrepl.middleware.stacktrace$analyze_causes$fn__4423.invoke(stacktrace.clj:348)
at clojure.core$map$fn__5931$fn__5932.invoke(core.clj:2759)
at clojure.core$take_while$fn__5982$fn__5983.invoke(core.clj:2918)
at clojure.lang.Iterate.reduce(Iterate.java:81)
at clojure.core$transduce.invokeStatic(core.clj:6946)
at clojure.core$into.invokeStatic(core.clj:6962)
at clojure.core$into.invoke(core.clj:6950)
at cider.nrepl.middleware.stacktrace$analyze_causes.invokeStatic(stacktrace.clj:347)
at cider.nrepl.middleware.stacktrace$analyze_causes.invoke(stacktrace.clj:339)
at cider.nrepl.middleware.stacktrace$handle_stacktrace.invokeStatic(stacktrace.clj:356)
at cider.nrepl.middleware.stacktrace$handle_stacktrace.invoke(stacktrace.clj:353)
at clojure.lang.Var.invoke(Var.java:388)
at cider.nrepl$wrap_stacktrace$fn__2459.invoke(nrepl.clj:432)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_info$fn__2385.invoke(nrepl.clj:208)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_clojuredocs$fn__2517.invoke(nrepl.clj:529)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.dynamic_loader$wrap_dynamic_loader$fn__1464.invoke(dynamic_loader.clj:98)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_apropos$fn__2335.invoke(nrepl.clj:129)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_ns$fn__2411.invoke(nrepl.clj:300)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_undef$fn__2491.invoke(nrepl.clj:493)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_version$fn__2501.invoke(nrepl.clj:504)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_macroexpand$fn__2403.invoke(nrepl.clj:287)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_refresh$fn__2435.invoke(nrepl.clj:380)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.completion$wrap_completion$fn__1788.invoke(completion.clj:58)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_resource$fn__2443.invoke(nrepl.clj:406)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_classpath$fn__2343.invoke(nrepl.clj:137)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_slurp$fn__2327.invoke(nrepl.clj:121)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_format$fn__2377.invoke(nrepl.clj:194)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.interruptible_eval$interruptible_eval$fn__1278.invoke(interruptible_eval.clj:154)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.load_file$wrap_load_file$fn__1820.invoke(load_file.clj:81)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_inspect$fn__2395.invoke(nrepl.clj:227)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.caught$wrap_caught$fn__1211.invoke(caught.clj:97)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_out$fn__2419.invoke(nrepl.clj:334)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.session$add_stdin$fn__1396.invoke(session.clj:379)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.sideloader$wrap_sideloader$fn__1901.invoke(sideloader.clj:108)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_content_type$fn__2319.invoke(nrepl.clj:107)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_debug$fn__2361.invoke(nrepl.clj:163)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_enlighten$fn__2369.invoke(nrepl.clj:190)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.print$wrap_print$fn__1178.invoke(print.clj:234)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_trace$fn__2475.invoke(nrepl.clj:464)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at cider.nrepl$wrap_tracker$fn__2483.invoke(nrepl.clj:482)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.middleware.session$session$fn__1381.invoke(session.clj:325)
at nrepl.middleware$wrap_conj_descriptor$fn__942.invoke(middleware.clj:16)
at nrepl.server$default_handler$fn__1949.invoke(server.clj:141)
at nrepl.server$handle_STAR_.invokeStatic(server.clj:24)
at nrepl.server$handle_STAR_.invoke(server.clj:21)
at nrepl.server$handle$fn__1917.invoke(server.clj:41)
at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment