Skip to content

Commit

Permalink
1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vemv committed Nov 24, 2023
1 parent 5c12eb9 commit 2bafc1e
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 110 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master (unreleased)

## 1.12.0 (2023-11-24)

### Changes

- [#3576](https://github.com/clojure-emacs/cider/issues/3576): CIDER [Inspector](https://docs.cider.mx/cider/debugging/inspector.html): display Java class/method/field block tags (Returns/Throws/Params info) when available.
Expand Down
218 changes: 109 additions & 109 deletions cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
;; Steve Purcell <[email protected]>
;; Maintainer: Bozhidar Batsov <[email protected]>
;; URL: https://www.github.com/clojure-emacs/cider
;; Version: 1.12.0-snapshot
;; Version: 1.12.0
;; Package-Requires: ((emacs "26") (clojure-mode "5.18.1") (parseedn "1.2.0") (queue "0.2") (spinner "1.7") (seq "2.22") (sesman "0.3.2") (transient "0.4.1"))
;; Keywords: languages, clojure, cider

Expand Down Expand Up @@ -93,7 +93,7 @@
(require 'sesman)
(require 'package)

(defconst cider-version "1.12.0-snapshot"
(defconst cider-version "1.12.0"
"The current version of CIDER.")

(defconst cider-codename "Split"
Expand Down Expand Up @@ -602,15 +602,15 @@ returned by this function does not include keyword arguments."
(append cider-jack-in-lein-plugins
`(("cider/cider-nrepl" ,cider-injected-middleware-version))))))
(thread-last
plugins
(seq-filter
(lambda (spec)
(if-let* ((pred (plist-get (seq-drop spec 2) :predicate)))
(funcall pred spec)
t)))
(mapcar
(lambda (spec)
(seq-take spec 2))))))
plugins
(seq-filter
(lambda (spec)
(if-let* ((pred (plist-get (seq-drop spec 2) :predicate)))
(funcall pred spec)
t)))
(mapcar
(lambda (spec)
(seq-take spec 2))))))

(defvar cider-jack-in-nrepl-middlewares nil
"List of Clojure variable names.
Expand All @@ -635,18 +635,18 @@ Added to `cider-jack-in-nrepl-middlewares' (which see) when doing
See `cider-jack-in-nrepl-middlewares' for the format, except that the list
returned by this function only contains strings."
(thread-last
cider-jack-in-nrepl-middlewares
(seq-filter
(lambda (spec)
(or (not (listp spec))
(if-let* ((pred (plist-get (cdr spec) :predicate)))
(funcall pred spec)
t))))
(mapcar
(lambda (spec)
(if (listp spec)
(car spec)
spec)))))
cider-jack-in-nrepl-middlewares
(seq-filter
(lambda (spec)
(or (not (listp spec))
(if-let* ((pred (plist-get (cdr spec) :predicate)))
(funcall pred spec)
t))))
(mapcar
(lambda (spec)
(if (listp spec)
(car spec)
spec)))))

(defun cider--list-as-boot-artifact (list)
"Return a boot artifact string described by the elements of LIST.
Expand Down Expand Up @@ -823,21 +823,21 @@ suitable `clojure` invocation and quoting, also accounting for COMMAND if
provided. The main is placed in an inline alias :cider/nrepl so that if
your aliases contain any mains, the cider/nrepl one will be the one used."
(let* ((all-deps (thread-last
dependencies
(append (cider--jack-in-required-dependencies))
;; Duplicates are never OK since they would result in
;; `java.lang.IllegalArgumentException: Duplicate key [...]`:
(cider--dedupe-deps)
(seq-map (lambda (dep)
(if (listp (cadr dep))
(format "%s {%s}"
(car dep)
(seq-reduce
(lambda (acc v)
(concat acc (format " :%s \"%s\" " (car v) (cdr v))))
(cadr dep)
""))
(format "%s {:mvn/version \"%s\"}" (car dep) (cadr dep)))))))
dependencies
(append (cider--jack-in-required-dependencies))
;; Duplicates are never OK since they would result in
;; `java.lang.IllegalArgumentException: Duplicate key [...]`:
(cider--dedupe-deps)
(seq-map (lambda (dep)
(if (listp (cadr dep))
(format "%s {%s}"
(car dep)
(seq-reduce
(lambda (acc v)
(concat acc (format " :%s \"%s\" " (car v) (cdr v))))
(cadr dep)
""))
(format "%s {:mvn/version \"%s\"}" (car dep) (cadr dep)))))))
(middleware (mapconcat
(apply-partially #'format "%s")
(cider-jack-in-normalized-nrepl-middlewares)
Expand Down Expand Up @@ -1345,10 +1345,10 @@ been determined."
Updates :project-dir and :jack-in-cmd.
Also checks whether a matching session already exists."
(thread-first
params
(cider--update-project-dir)
(cider--check-existing-session)
(cider--update-jack-in-cmd)))
params
(cider--update-project-dir)
(cider--check-existing-session)
(cider--update-jack-in-cmd)))

;;;###autoload
(defun cider-jack-in-clj (params)
Expand Down Expand Up @@ -1388,10 +1388,10 @@ these parameters."
(orig-buffer (current-buffer)))
;; cider--update-jack-in-cmd relies indirectly on the above dynamic vars
(let ((params (thread-first
params
(cider--update-project-dir)
(cider--check-existing-session)
(cider--update-jack-in-cmd))))
params
(cider--update-project-dir)
(cider--check-existing-session)
(cider--update-jack-in-cmd))))
(nrepl-start-server-process
(plist-get params :project-dir)
(plist-get params :jack-in-cmd)
Expand All @@ -1418,13 +1418,13 @@ only when the ClojureScript dependencies are met."
(orig-buffer (current-buffer)))
;; cider--update-jack-in-cmd relies indirectly on the above dynamic vars
(let ((params (thread-first
params
(cider--update-project-dir)
(cider--check-existing-session)
(cider--update-jack-in-cmd)
(cider--update-cljs-type)
;; already asked, don't ask on sibling connect
(plist-put :do-prompt nil))))
params
(cider--update-project-dir)
(cider--check-existing-session)
(cider--update-jack-in-cmd)
(cider--update-cljs-type)
;; already asked, don't ask on sibling connect
(plist-put :do-prompt nil))))
(nrepl-start-server-process
(plist-get params :project-dir)
(plist-get params :jack-in-cmd)
Expand All @@ -1450,12 +1450,12 @@ server is created."
(ses-name (unless (nrepl-server-p other-repl)
(sesman-session-name-for-object 'CIDER other-repl))))
(thread-first
params
(cider--update-do-prompt)
(append other-params)
(plist-put :repl-init-function nil)
(plist-put :repl-type 'clj)
(plist-put :session-name ses-name)))))
params
(cider--update-do-prompt)
(append other-params)
(plist-put :repl-init-function nil)
(plist-put :repl-type 'clj)
(plist-put :session-name ses-name)))))

;;;###autoload
(defun cider-connect-sibling-cljs (params &optional other-repl)
Expand All @@ -1475,13 +1475,13 @@ server buffer, in which case a new session for that server is created."
(sesman-session-name-for-object 'CIDER other-repl))))
(cider-nrepl-connect
(thread-first
params
(cider--update-do-prompt)
(append other-params)
(cider--update-cljs-type)
(cider--update-cljs-init-function)
(plist-put :session-name ses-name)
(plist-put :repl-type 'cljs)))))
params
(cider--update-do-prompt)
(append other-params)
(cider--update-cljs-type)
(cider--update-cljs-init-function)
(plist-put :session-name ses-name)
(plist-put :repl-type 'cljs)))))

;;;###autoload
(defun cider-connect-clj (&optional params)
Expand All @@ -1491,13 +1491,13 @@ prefix argument, prompt for all the parameters."
(interactive "P")
(cider-nrepl-connect
(thread-first
params
(cider--update-project-dir)
(cider--update-host-port)
(cider--check-existing-session)
(plist-put :repl-init-function nil)
(plist-put :session-name nil)
(plist-put :repl-type 'clj))))
params
(cider--update-project-dir)
(cider--update-host-port)
(cider--check-existing-session)
(plist-put :repl-init-function nil)
(plist-put :session-name nil)
(plist-put :repl-type 'clj))))

;;;###autoload
(defun cider-connect-cljs (&optional params)
Expand All @@ -1510,14 +1510,14 @@ parameters regardless of their supplied or default values."
(interactive "P")
(cider-nrepl-connect
(thread-first
params
(cider--update-project-dir)
(cider--update-host-port)
(cider--check-existing-session)
(cider--update-cljs-type)
(cider--update-cljs-init-function)
(plist-put :session-name nil)
(plist-put :repl-type 'cljs))))
params
(cider--update-project-dir)
(cider--update-host-port)
(cider--check-existing-session)
(cider--update-cljs-type)
(cider--update-cljs-init-function)
(plist-put :session-name nil)
(plist-put :repl-type 'cljs))))

;;;###autoload
(defun cider-connect-clj&cljs (params &optional soft-cljs-start)
Expand All @@ -1527,15 +1527,15 @@ PARAMS is a plist optionally containing :host, :port, :project-dir and
non-nil, don't start if ClojureScript requirements are not met."
(interactive "P")
(let* ((params (thread-first
params
(cider--update-project-dir)
(cider--update-host-port)
(cider--check-existing-session)
(cider--update-cljs-type)))
params
(cider--update-project-dir)
(cider--update-host-port)
(cider--check-existing-session)
(cider--update-cljs-type)))
(clj-params (thread-first
params
copy-sequence
(map-delete :cljs-repl-type)))
params
copy-sequence
(map-delete :cljs-repl-type)))
(clj-repl (cider-connect-clj clj-params)))
(when (if soft-cljs-start
(cider--check-cljs (plist-get params :cljs-repl-type) 'no-error)
Expand Down Expand Up @@ -1606,9 +1606,9 @@ Params is a plist with the following keys (non-exhaustive)
(let ((default-directory proj-dir))
(hack-dir-local-variables-non-file-buffer)
(thread-first
params
(plist-put :project-dir proj-dir)
(plist-put :--context-buffer (current-buffer)))))))))
params
(plist-put :project-dir proj-dir)
(plist-put :--context-buffer (current-buffer)))))))))

(defun cider--update-cljs-type (params)
"Update :cljs-repl-type in PARAMS."
Expand Down Expand Up @@ -1705,9 +1705,9 @@ PARAMS is a plist with the following keys (non-exhaustive list)
(if (equal "local-unix-domain-socket" (car endpoint))
(plist-put params :socket-file (cdr endpoint))
(thread-first
params
(plist-put :host (car endpoint))
(plist-put :port (cdr endpoint)))))))
params
(plist-put :host (car endpoint))
(plist-put :port (cdr endpoint)))))))

(defun cider--update-cljs-init-function (params)
"Update repl type and any init PARAMS for cljs connections.
Expand All @@ -1729,20 +1729,20 @@ over to cljs.
(plist-put params :cider-repl-cljs-upgrade-pending nil)

(thread-first
params
(plist-put :cider-repl-cljs-upgrade-pending t)
(plist-put :repl-init-function
(lambda ()
(cider--check-cljs cljs-type)
(cider-nrepl-send-request
(list "op" "eval"
"ns" (cider-current-ns)
"code" repl-init-form)
(cider-repl-handler (current-buffer)))
(when (and (buffer-live-p nrepl-server-buffer)
cider-offer-to-open-cljs-app-in-browser)
(cider--offer-to-open-app-in-browser nrepl-server-buffer))))
(plist-put :repl-init-form repl-init-form))))))
params
(plist-put :cider-repl-cljs-upgrade-pending t)
(plist-put :repl-init-function
(lambda ()
(cider--check-cljs cljs-type)
(cider-nrepl-send-request
(list "op" "eval"
"ns" (cider-current-ns)
"code" repl-init-form)
(cider-repl-handler (current-buffer)))
(when (and (buffer-live-p nrepl-server-buffer)
cider-offer-to-open-cljs-app-in-browser)
(cider--offer-to-open-app-in-browser nrepl-server-buffer))))
(plist-put :repl-init-form repl-init-form))))))

(defun cider--check-existing-session (params)
"Ask for confirmation if a session with similar PARAMS already exists.
Expand Down
2 changes: 1 addition & 1 deletion doc/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: cider
title: CIDER
# We always provide version without patch here (e.g. 1.1),
# as patch versions should not appear in the docs.
version: ~
version: 1.12
nav:
- modules/ROOT/nav.adoc
7 changes: 7 additions & 0 deletions doc/modules/ROOT/pages/about/compatibility.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ Below you can find the official compatibility matrix for CIDER.
| 8
| 1.8

| 1.12

This comment has been minimized.

Copy link
@bbatsov

bbatsov Nov 27, 2023

Member

Hmm, seem we forgot the entries for 1.10 and 11.

| 26.1
| 1.0
| 0.44
| 8
| 1.8

|===

TIP: You can also check the requirements of a particular CIDER version by inspecting
Expand Down

0 comments on commit 2bafc1e

Please sign in to comment.