diff options
authorMichael Griffiths <>2019-02-04 20:33:15 +0000
committerSean Whitton <>2019-03-15 15:54:19 -0700
commit2f3122fa05e65823d8db2d304b64995d25f60791 (patch)
parent4c02120a6571ed898f352650fa36d68cf1b1c0ce (diff)
Update to nrepl 0.6.0 / cider-nrepl 0.21.0
(cherry picked from commit a48af155d8acf64e7c3025146027ef2d62f1cc2e)
6 files changed, 19 insertions, 18 deletions
diff --git a/cider-client.el b/cider-client.el
index 9912ac2a..964049f8 100644
--- a/cider-client.el
+++ b/cider-client.el
@@ -235,9 +235,12 @@ with respect to the bound values of \\=`*print-length*\\=`, \\=`*print-level*\\=
PPRINT-FN is the name of the Clojure function to use.
RIGHT-MARGIN specifies the maximum column-width of the pretty-printed
result, and is included in the request if non-nil."
- (nconc `("pprint" "true"
- "pprint-fn" ,(or pprint-fn (cider--pprint-fn)))
- (and right-margin `("print-right-margin" ,right-margin))))
+ (let* ((print-options (or cider-pprint-options (nrepl-dict))))
+ (when right-margin
+ (setq print-options (nrepl-dict-put print-options (cider--pprint-option "right-margin" cider-pprint-fn) right-margin)))
+ (append `("nrepl.middleware.print/print" ,(or pprint-fn (cider--pprint-fn))
+ "nrepl.middleware.print/stream?" "1")
+ (and (not (nrepl-dict-empty-p print-options)) `("nrepl.middleware.print/options" ,print-options)))))
(defun cider--nrepl-content-type-plist ()
"Plist to be appended to an eval request to make it use content-types."
diff --git a/cider-eval.el b/cider-eval.el
index 946d55ee..19cdbf24 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -278,11 +278,9 @@ into a new error buffer."
(nconc '("op" "stacktrace")
(when (cider--pprint-fn)
- `("pprint-fn" ,(cider--pprint-fn)))
- (when cider-stacktrace-print-length
- `("print-length" ,cider-stacktrace-print-length))
- (when cider-stacktrace-print-level
- `("print-level" ,cider-stacktrace-print-level)))
+ `("nrepl.middleware.print/print" ,(cider--pprint-fn)))
+ (when cider-stacktrace-print-options
+ `("nrepl.middleware.print/options" ,cider-stacktrace-print-options)))
(lambda (response)
;; While the return value of `cider--handle-stacktrace-response' is not
;; meaningful for the last message, we do not need the value of `causes'
diff --git a/cider-ns.el b/cider-ns.el
index e89ed07b..b27fdeca 100644
--- a/cider-ns.el
+++ b/cider-ns.el
@@ -249,7 +249,9 @@ refresh functions (defined in `cider-ns-refresh-before-fn' and
"print-length" ,cider-stacktrace-print-length
"print-level" ,cider-stacktrace-print-level)
(when (cider--pprint-fn)
- `("pprint-fn" ,(cider--pprint-fn)))
+ `("nrepl.middleware.print/print" ,(cider--pprint-fn)))
+ (when cider-stacktrace-print-options
+ `("nrepl.middleware.print/options" ,cider-stacktrace-print-options))
(when (and (not inhibit-refresh-fns) cider-ns-refresh-before-fn)
`("before" ,cider-ns-refresh-before-fn))
(when (and (not inhibit-refresh-fns) cider-ns-refresh-after-fn)
diff --git a/cider-repl.el b/cider-repl.el
index 3adfb1d4..1d3e5304 100644
--- a/cider-repl.el
+++ b/cider-repl.el
@@ -873,7 +873,7 @@ nREPL ops, it may be convenient to prevent inserting a prompt.")
(lambda (buffer value)
- (cider-repl-emit-result buffer value (not after-first-result-chunk) t)
+ (cider-repl-emit-result buffer value (not after-first-result-chunk))
(setq after-first-result-chunk t))
(lambda (buffer out)
(cider-repl-emit-stdout buffer out))
diff --git a/cider-test.el b/cider-test.el
index 5182b57b..e60eef2a 100644
--- a/cider-test.el
+++ b/cider-test.el
@@ -283,11 +283,9 @@ prompt and whether to use a new window. Similar to `cider-find-var'."
"var" ,var
"index" ,index)
(when (cider--pprint-fn)
- `("pprint-fn" ,(cider--pprint-fn)))
- (when cider-stacktrace-print-length
- `("print-length" ,cider-stacktrace-print-length))
- (when cider-stacktrace-print-level
- `("print-level" ,cider-stacktrace-print-level)))
+ `("nrepl.middleware.print/print" ,(cider--pprint-fn)))
+ (when cider-stacktrace-print-options
+ `("nrepl.middleware.print/options" ,cider-stacktrace-print-options)))
(lambda (response)
(nrepl-dbind-response response (class status)
(cond (class (setq causes (cons response causes)))
diff --git a/cider.el b/cider.el
index 75014b58..a70e3788 100644
--- a/cider.el
+++ b/cider.el
@@ -377,7 +377,7 @@ Throws an error if PROJECT-TYPE is unknown."
;; We inject the newest known version of nREPL just in case
;; your version of Boot or Leiningen is bundling an older one.
(cider-add-to-alist 'cider-jack-in-dependencies
- "nrepl" "0.5.3")
+ "nrepl" "0.6.0")
(defvar cider-jack-in-cljs-dependencies nil
"List of dependencies where elements are lists of artifact name and version.
@@ -401,10 +401,10 @@ Elements of the list are artifact name and list of exclusions to apply for the a
(defconst cider-latest-clojure-version "1.10.0"
"Latest supported version of Clojure.")
-(defconst cider-required-middleware-version "0.18.0"
+(defconst cider-required-middleware-version "0.21.0"
"The minimum CIDER nREPL version that's known to work properly with CIDER.")
-(defconst cider-latest-middleware-version "0.19.0"
+(defconst cider-latest-middleware-version "0.21.0"
"The latest CIDER nREPL version that's known to work properly with CIDER.")
(defcustom cider-jack-in-auto-inject-clojure nil