diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2018-08-06 09:07:34 +0300 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2018-08-06 09:07:34 +0300 |
commit | 2ab2e3e1518d244236443cb82b130b81499050d6 (patch) | |
tree | fdac810a578c7a4fb7fb3fd88ef51c61be0a3072 | |
parent | 1c9f9e33a2c3995774953e43906148200b11507e (diff) |
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.
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | cider-connection.el | 7 | ||||
-rw-r--r-- | cider.el | 8 | ||||
-rw-r--r-- | doc/installation.md | 8 | ||||
-rw-r--r-- | doc/troubleshooting.md | 4 |
5 files changed, 20 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c0556667..6f3aafe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,7 @@ * **(Breaking)** Move `cider-ns-refresh`, previously on `C-c C-x`, on `C-c M-n (M-)r` in the `cider-ns-map`. * **(Breaking)** Bump the minimum required Emacs version to 25.1. * **(Breaking)** Drop support for Java 7 and Clojure(Script) 1.7. -* **(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. +* **(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. * Rename `cider-eval-defun-to-point` to `cider-eval-defun-up-to-point`. * Add support for printing to the current buffer to `cider-eval-defun-up-to-point`. * Remove `cider-ping` command. @@ -51,6 +51,7 @@ * **(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`. * **(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`. * Accept bare figwheel-main build names (e.g., `dev`). Previously, a keyword (e.g., `:dev`) was required. +* 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. ## 0.17.0 (2018-05-07) diff --git a/cider-connection.el b/cider-connection.el index 9db28bb2..52f77855 100644 --- a/cider-connection.el +++ b/cider-connection.el @@ -195,6 +195,7 @@ FORMAT is a format string to compile with ARGS and display on the REPL." "Can't determine Clojure's version. CIDER requires Clojure %s (or newer)." cider-minimum-clojure-version))) +(defvar cider-required-middleware-version) (defun cider--check-middleware-compatibility () "CIDER frontend/backend compatibility check. Retrieve the underlying connection's CIDER-nREPL version and checks if the @@ -202,10 +203,10 @@ middleware used is compatible with CIDER. If not, will display a warning message in the REPL area." (let* ((version-dict (nrepl-aux-info "cider-version" (cider-current-repl))) (middleware-version (nrepl-dict-get version-dict "version-string" "not installed"))) - (unless (equal cider-version middleware-version) + (unless (version<= cider-required-middleware-version middleware-version) (cider-emit-manual-warning "troubleshooting/#cider-complains-of-the-cider-nrepl-version" - "CIDER's version (%s) does not match cider-nrepl's version (%s). Things will break!" - cider-version middleware-version)))) + "CIDER %s requires cider-nrepl %s+, but you're currently using cider-nrepl %s. Things will break!" + cider-version cider-required-middleware-version middleware-version)))) (declare-function cider-interactive-eval-handler "cider-eval") ;; TODO: Use some null handler here @@ -391,6 +391,12 @@ 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" + "The minimum CIDER nREPL version that's known to work properly with CIDER.") + +(defconst cider-latest-middleware-version "0.18.0" + "The latest CIDER nREPL version that's known to work properly with CIDER.") + (defcustom cider-jack-in-auto-inject-clojure nil "Version of clojure to auto-inject into REPL. 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 want to inject some middleware only when within a project context.)") (put 'cider-jack-in-lein-plugins 'risky-local-variable t) (cider-add-to-alist 'cider-jack-in-lein-plugins - "cider/cider-nrepl" (upcase cider-version)) + "cider/cider-nrepl" cider-latest-middleware-version) (defvar cider-jack-in-cljs-lein-plugins nil "List of Leiningen plugins to be injected at jack-in. diff --git a/doc/installation.md b/doc/installation.md index 0b513216..f295af33 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -202,6 +202,8 @@ It goes without saying that your project should depend on `cider-nrepl`. !!! note - `x.y.z` should match the version of CIDER you're currently using (say `0.17.0`). - For snapshot releases of CIDER you should use the snapshot of the plugin as well - (say `0.18.0-SNAPSHOT`). + `x.y.z` should be compatible with the version of CIDER you're currently using. + The required version can be checked in `cider-required-middleware-version`. + Prior to CIDER 0.18, CIDER and cider-nrepl were always released together + and their versions had to match for things to work, but as the prominence + of cider-nrepl grew and many other tools started using, this was changed. diff --git a/doc/troubleshooting.md b/doc/troubleshooting.md index 00f3e070..bbb579f9 100644 --- a/doc/troubleshooting.md +++ b/doc/troubleshooting.md @@ -143,9 +143,9 @@ effect of changes you have to restart Emacs. This is a warning displayed on the REPL buffer when it starts, and usually looks like this: -> **WARNING:** CIDER's version (0.12.0) does not match cider-nrepl's version (...). Things will break! +> **WARNING:** CIDER 0.18.0 requires cider-nrepl x.y.z+, but you're currently using cider-nrepl a.b.c. Things will break! -where `...` might be an actual version, like `0.10.0`, or it might be `not installed` or `nil`. +where `a.b.c` might be an actual version, like `0.17.0`, or it might be `not installed` or `nil`. The solution to this depends on what you see and on what you're doing. #### You see a number like `X.X.X`, and you're starting the REPL with `cider-connect` |