Closed
Description
Expected behavior
When trying to evaluate a form with an error at compile time, or instance evaling a symbol that wasn't def
'd, a *cider-error*
buffer should pop up with a message like:
Unable to resolve symbol: foo in this context
This is working on all clojure versions up to and including 1.10.0-alpha6
Actual behavior
On the newly released 1.10.0-alpha7
no *cider-error*
buffer appears and this stacktrace is printed to the repl buffer:
Syntax error compiling at (/home/adam/.../file.clj:1:14953).
Cause: Unable to resolve symbol: foo in this context
08:47:37 ERROR -agent-send-off-pool-6 c.t.n.server Unhandled REPL handler exception processing message {:op stacktrace, :pprint-fn clojure.pprint/pprint, :print-length 50, :print-level 50, :session 1ce5fdb6-4ef6-41d5-93d8-3726abae8cbe, :id 42}
java.lang.NullPointerException: null
at clojure.string$replace_first.invokeStatic(string.clj:165)
at clojure.string$replace_first.invoke(string.clj:138)
at cider.nrepl.middleware.stacktrace$relative_path.invokeStatic(stacktrace.clj:204)
at cider.nrepl.middleware.stacktrace$relative_path.invoke(stacktrace.clj:198)
at cider.nrepl.middleware.stacktrace$extract_location.invokeStatic(stacktrace.clj:219)
at cider.nrepl.middleware.stacktrace$extract_location.invoke(stacktrace.clj:206)
at clojure.core$comp$fn__5628.invoke(core.clj:2561)
at clojure.core$map$fn__5686.invoke(core.clj:2747)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:51)
at clojure.lang.RT.seq(RT.java:528)
at clojure.core$seq__5223.invokeStatic(core.clj:137)
at clojure.core$seq__5223.invoke(core.clj:137)
at cider.nrepl.middleware.stacktrace$handle_stacktrace.invokeStatic(stacktrace.clj:312)
at cider.nrepl.middleware.stacktrace$handle_stacktrace.invoke(stacktrace.clj:309)
Looking at clojure's changelog, I believe it's likely that CLJ-2386 was the culprit for the breaking change.
Steps to reproduce the problem
Eval a symbol foo
in an otherwise blank clojure buffer while running clojure 1.10.0-alpha7
CIDER version information
Include here the version string displayed when
CIDER's REPL is launched. Here's an example:
;; CIDER 0.18.0snapshot (package: 20180806.1933), nREPL 0.2.13
;; Clojure 1.10.0-alpha7, Java 1.8.0_181
Emacs version
27.0.50
Operating system
Linux