branch: elpa/cider
commit 6156c011c4e044fbede9014693676140ce9336ae
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Correct the stdin-cancel rationale (old abort EOF'd, didn't hang)
    
    A live nREPL test showed the pre-#4106 abort didn't leave the read hung:
    nil bencodes to an empty list, and nREPL's add-stdin treats an empty
    value as EOF, so cancelling silently ended the read and let evaluation
    continue. Fix the docstring and CHANGELOG wording accordingly; the
    behavior (cancel now interrupts) is unchanged.
---
 CHANGELOG.md         | 2 +-
 lisp/cider-client.el | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7bd86acf2..0b77f74f54 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,7 +48,7 @@
 ### Bugs fixed
 
 - [#4107](https://github.com/clojure-emacs/cider/pull/4107): Route stdin input 
(and a cancel's interrupt) to the exact connection that requested it, so reads 
no longer misroute to the wrong session when several connections are active.
-- [#4106](https://github.com/clojure-emacs/cider/pull/4106): Cancelling a 
stdin prompt (when evaluated code reads input) now interrupts the evaluation 
instead of sending a malformed `stdin` op that left the read hung. The prompt 
also names the REPL when the session has more than one connection.
+- [#4106](https://github.com/clojure-emacs/cider/pull/4106): Cancelling a 
stdin prompt (when evaluated code reads input) now interrupts the evaluation. 
Previously it sent a type-incorrect `stdin` value that nREPL treated as EOF, so 
the read ended and evaluation continued instead of being cancelled. The prompt 
also names the REPL when the session has more than one connection.
 - [#4093](https://github.com/clojure-emacs/cider/pull/4093): Fix a crash 
(`wrong-type-argument stringp nil`) when a REPL result is truncated by the 
print middleware.
 - [#4089](https://github.com/clojure-emacs/cider/issues/4089): Fix 
`cider-macroexpand-undo` failing with a read-only error in the macroexpansion 
buffer.
 - [#4085](https://github.com/clojure-emacs/cider/pull/4085): Resolve 
unqualified ClojureScript core vars (e.g. their indentation metadata) against 
`cljs.core` in a cljs REPL, instead of always falling back to `clojure.core`.
diff --git a/lisp/cider-client.el b/lisp/cider-client.el
index e8e1c05e3f..7906b80366 100644
--- a/lisp/cider-client.el
+++ b/lisp/cider-client.el
@@ -1214,8 +1214,9 @@ one `cider-current-repl' happens to resolve to."
   "Handle a need-input request from BUFFER.
 Read a line at the minibuffer and send it to the blocked evaluation.
 Cancelling the prompt interrupts that evaluation instead: the previous
-behavior sent nil, which bencodes to an empty list rather than a string, so
-the `stdin' op was malformed and the read never unblocked cleanly.
+behavior sent nil, which bencodes to an empty list rather than a string - a
+type-incorrect `stdin' op that nREPL treated as EOF, so cancelling silently
+ended the read and let the evaluation continue instead of cancelling it.
 
 RESPONSE is the nREPL need-input response (the message whose status is
 \"need-input\").  When given, its `session' selects the exact connection to

Reply via email to