Skip to content

Commit 2ab2e3e

Browse files
committed
Stop releasing CIDER and cider-nrepl together
cider-nrepl now has its own release cycle and CIDER introduces `cider-required-middleware-version` to track it.
1 parent 1c9f9e3 commit 2ab2e3e

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* **(Breaking)** Move `cider-ns-refresh`, previously on `C-c C-x`, on `C-c M-n (M-)r` in the `cider-ns-map`.
3939
* **(Breaking)** Bump the minimum required Emacs version to 25.1.
4040
* **(Breaking)** Drop support for Java 7 and Clojure(Script) 1.7.
41-
* **(Breaking)** Use session name as part of CIDER buffers names (REPL, server, messages), and obsolete `nrepl-buffer-name-separator` and `nrepl-buffer-name-show-port`. See `cider-session-name-template` and `cider-format-connection-params` for how to customize CIDER buffer names.
41+
* **(Breaking)** Use session name as part of CIDER buffers names (REPL, server, messages), and obsolete `nrepl-buffer-name-separator` and `nrepl-buffer-name-show-port`. See `cider-session-name-template` and `cider-format-connection-params` for how to customize CIDER buffer names.
4242
* Rename `cider-eval-defun-to-point` to `cider-eval-defun-up-to-point`.
4343
* Add support for printing to the current buffer to `cider-eval-defun-up-to-point`.
4444
* Remove `cider-ping` command.
@@ -51,6 +51,7 @@
5151
* **(Breaking)** Move `cider-pprint-eval-last-sexp`, previously on `C-c C-p`, to `C-c C-v (C-)f (C-)e` in the `cider-eval-commands-map`.
5252
* **(Breaking)** Move `cider-pprint-eval-defun-at-point`, previously on `C-c C-f`, to `C-c C-v (C-)f (C-)d` in the `cider-eval-commands-map`.
5353
* Accept bare figwheel-main build names (e.g., `dev`). Previously, a keyword (e.g., `:dev`) was required.
54+
* Stop releasing CIDER and cider-nrepl together. cider-nrepl now has its own release cycle and CIDER introduces `cider-required-middleware-version` to track it.
5455

5556
## 0.17.0 (2018-05-07)
5657

cider-connection.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,18 @@ FORMAT is a format string to compile with ARGS and display on the REPL."
195195
"Can't determine Clojure's version. CIDER requires Clojure %s (or newer)."
196196
cider-minimum-clojure-version)))
197197

198+
(defvar cider-required-middleware-version)
198199
(defun cider--check-middleware-compatibility ()
199200
"CIDER frontend/backend compatibility check.
200201
Retrieve the underlying connection's CIDER-nREPL version and checks if the
201202
middleware used is compatible with CIDER. If not, will display a warning
202203
message in the REPL area."
203204
(let* ((version-dict (nrepl-aux-info "cider-version" (cider-current-repl)))
204205
(middleware-version (nrepl-dict-get version-dict "version-string" "not installed")))
205-
(unless (equal cider-version middleware-version)
206+
(unless (version<= cider-required-middleware-version middleware-version)
206207
(cider-emit-manual-warning "troubleshooting/#cider-complains-of-the-cider-nrepl-version"
207-
"CIDER's version (%s) does not match cider-nrepl's version (%s). Things will break!"
208-
cider-version middleware-version))))
208+
"CIDER %s requires cider-nrepl %s+, but you're currently using cider-nrepl %s. Things will break!"
209+
cider-version cider-required-middleware-version middleware-version))))
209210

210211
(declare-function cider-interactive-eval-handler "cider-eval")
211212
;; TODO: Use some null handler here

cider.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ Elements of the list are artifact name and list of exclusions to apply for the a
391391
(defconst cider-latest-clojure-version "1.10.0"
392392
"Latest supported version of Clojure.")
393393

394+
(defconst cider-required-middleware-version "0.18.0"
395+
"The minimum CIDER nREPL version that's known to work properly with CIDER.")
396+
397+
(defconst cider-latest-middleware-version "0.18.0"
398+
"The latest CIDER nREPL version that's known to work properly with CIDER.")
399+
394400
(defcustom cider-jack-in-auto-inject-clojure nil
395401
"Version of clojure to auto-inject into REPL.
396402
If nil, do not inject Clojure into the REPL. If `latest', inject
@@ -418,7 +424,7 @@ that extend CIDER, not for users. For example, a refactoring package might
418424
want to inject some middleware only when within a project context.)")
419425
(put 'cider-jack-in-lein-plugins 'risky-local-variable t)
420426
(cider-add-to-alist 'cider-jack-in-lein-plugins
421-
"cider/cider-nrepl" (upcase cider-version))
427+
"cider/cider-nrepl" cider-latest-middleware-version)
422428

423429
(defvar cider-jack-in-cljs-lein-plugins nil
424430
"List of Leiningen plugins to be injected at jack-in.

doc/installation.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ It goes without saying that your project should depend on `cider-nrepl`.
202202

203203
!!! note
204204

205-
`x.y.z` should match the version of CIDER you're currently using (say `0.17.0`).
206-
For snapshot releases of CIDER you should use the snapshot of the plugin as well
207-
(say `0.18.0-SNAPSHOT`).
205+
`x.y.z` should be compatible with the version of CIDER you're currently using.
206+
The required version can be checked in `cider-required-middleware-version`.
207+
Prior to CIDER 0.18, CIDER and cider-nrepl were always released together
208+
and their versions had to match for things to work, but as the prominence
209+
of cider-nrepl grew and many other tools started using, this was changed.

doc/troubleshooting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ effect of changes you have to restart Emacs.
143143

144144
This is a warning displayed on the REPL buffer when it starts, and usually looks like this:
145145

146-
> **WARNING:** CIDER's version (0.12.0) does not match cider-nrepl's version (...). Things will break!
146+
> **WARNING:** CIDER 0.18.0 requires cider-nrepl x.y.z+, but you're currently using cider-nrepl a.b.c. Things will break!
147147
148-
where `...` might be an actual version, like `0.10.0`, or it might be `not installed` or `nil`.
148+
where `a.b.c` might be an actual version, like `0.17.0`, or it might be `not installed` or `nil`.
149149
The solution to this depends on what you see and on what you're doing.
150150

151151
#### You see a number like `X.X.X`, and you're starting the REPL with `cider-connect`

0 commit comments

Comments
 (0)