Description
Expected behavior
cider-load-buffer
should report any top-level exceptions
Actual behavior
eval-last-sexp
on e.g. (cons 1 2)
will correctly report an error, while cider-load-buffer
with the same expression at top-level will simply ignore it and report nothing.
Steps to reproduce the problem
cider-jack-in-cljs
with Node repl
(ns main
(:require
[cljs.nodejs :as node]
[cljs.pprint :as pp]))
(cons 1 2)
cider-eval-last-sexp
will correctly report not ISeqable error when evaluating that (cons ...)
, however cider-load-buffer
will happily run till completion completely ignoring any such errors.
We can confirm error is thrown and can be caught by wrapping that cons
in (try (cons 1 2) (catch :default e (println :foo)))
then cider-load-buffer
will print :foo
.
My best guess is that default cider-load-file-handler
for Node does or doesn't do something here? Not sure.
Environment & Version information
Reproduced
CIDER version information
;; CIDER 1.2.0 (Nice), nREPL 0.9.0
;; Clojure 1.10.3, Java 17.0.1
Lein/Boot version
Emacs version
27.2 and 28.0.50
Operating system
Mac OSX 11.6.2 Big Sur
Latest Guix SD