11
11
; ; Steve Purcell <steve@sanityinc.com>
12
12
; ; Maintainer: Bozhidar Batsov <bozhidar@batsov.dev>
13
13
; ; URL: https://www.github.com/clojure-emacs/cider
14
- ; ; Version: 1.12.0-snapshot
14
+ ; ; Version: 1.12.0
15
15
; ; 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"))
16
16
; ; Keywords: languages, clojure, cider
17
17
93
93
(require 'sesman )
94
94
(require 'package )
95
95
96
- (defconst cider-version " 1.12.0-snapshot "
96
+ (defconst cider-version " 1.12.0"
97
97
" The current version of CIDER." )
98
98
99
99
(defconst cider-codename " Split"
@@ -602,15 +602,15 @@ returned by this function does not include keyword arguments."
602
602
(append cider-jack-in-lein-plugins
603
603
`((" cider/cider-nrepl" , cider-injected-middleware-version ))))))
604
604
(thread-last
605
- plugins
606
- (seq-filter
607
- (lambda (spec )
608
- (if-let* ((pred (plist-get (seq-drop spec 2 ) :predicate )))
609
- (funcall pred spec)
610
- t )))
611
- (mapcar
612
- (lambda (spec )
613
- (seq-take spec 2 ))))))
605
+ plugins
606
+ (seq-filter
607
+ (lambda (spec )
608
+ (if-let* ((pred (plist-get (seq-drop spec 2 ) :predicate )))
609
+ (funcall pred spec)
610
+ t )))
611
+ (mapcar
612
+ (lambda (spec )
613
+ (seq-take spec 2 ))))))
614
614
615
615
(defvar cider-jack-in-nrepl-middlewares nil
616
616
" List of Clojure variable names.
@@ -635,18 +635,18 @@ Added to `cider-jack-in-nrepl-middlewares' (which see) when doing
635
635
See `cider-jack-in-nrepl-middlewares' for the format, except that the list
636
636
returned by this function only contains strings."
637
637
(thread-last
638
- cider-jack-in-nrepl-middlewares
639
- (seq-filter
640
- (lambda (spec )
641
- (or (not (listp spec))
642
- (if-let* ((pred (plist-get (cdr spec) :predicate )))
643
- (funcall pred spec)
644
- t ))))
645
- (mapcar
646
- (lambda (spec )
647
- (if (listp spec)
648
- (car spec)
649
- spec)))))
638
+ cider-jack-in-nrepl-middlewares
639
+ (seq-filter
640
+ (lambda (spec )
641
+ (or (not (listp spec))
642
+ (if-let* ((pred (plist-get (cdr spec) :predicate )))
643
+ (funcall pred spec)
644
+ t ))))
645
+ (mapcar
646
+ (lambda (spec )
647
+ (if (listp spec)
648
+ (car spec)
649
+ spec)))))
650
650
651
651
(defun cider--list-as-boot-artifact (list )
652
652
" Return a boot artifact string described by the elements of LIST.
@@ -823,21 +823,21 @@ suitable `clojure` invocation and quoting, also accounting for COMMAND if
823
823
provided. The main is placed in an inline alias :cider/nrepl so that if
824
824
your aliases contain any mains, the cider/nrepl one will be the one used."
825
825
(let* ((all-deps (thread-last
826
- dependencies
827
- (append (cider--jack-in-required-dependencies))
828
- ; ; Duplicates are never OK since they would result in
829
- ; ; `java.lang.IllegalArgumentException: Duplicate key [...]`:
830
- (cider--dedupe-deps)
831
- (seq-map (lambda (dep )
832
- (if (listp (cadr dep))
833
- (format " %s {%s }"
834
- (car dep)
835
- (seq-reduce
836
- (lambda (acc v )
837
- (concat acc (format " :%s \" %s \" " (car v) (cdr v))))
838
- (cadr dep)
839
- " " ))
840
- (format " %s {:mvn/version \" %s \" }" (car dep) (cadr dep)))))))
826
+ dependencies
827
+ (append (cider--jack-in-required-dependencies))
828
+ ; ; Duplicates are never OK since they would result in
829
+ ; ; `java.lang.IllegalArgumentException: Duplicate key [...]`:
830
+ (cider--dedupe-deps)
831
+ (seq-map (lambda (dep )
832
+ (if (listp (cadr dep))
833
+ (format " %s {%s }"
834
+ (car dep)
835
+ (seq-reduce
836
+ (lambda (acc v )
837
+ (concat acc (format " :%s \" %s \" " (car v) (cdr v))))
838
+ (cadr dep)
839
+ " " ))
840
+ (format " %s {:mvn/version \" %s \" }" (car dep) (cadr dep)))))))
841
841
(middleware (mapconcat
842
842
(apply-partially #'format " %s" )
843
843
(cider-jack-in-normalized-nrepl-middlewares)
@@ -1345,10 +1345,10 @@ been determined."
1345
1345
Updates :project-dir and :jack-in-cmd.
1346
1346
Also checks whether a matching session already exists."
1347
1347
(thread-first
1348
- params
1349
- (cider--update-project-dir)
1350
- (cider--check-existing-session)
1351
- (cider--update-jack-in-cmd)))
1348
+ params
1349
+ (cider--update-project-dir)
1350
+ (cider--check-existing-session)
1351
+ (cider--update-jack-in-cmd)))
1352
1352
1353
1353
;;;### autoload
1354
1354
(defun cider-jack-in-clj (params )
@@ -1388,10 +1388,10 @@ these parameters."
1388
1388
(orig-buffer (current-buffer )))
1389
1389
; ; cider--update-jack-in-cmd relies indirectly on the above dynamic vars
1390
1390
(let ((params (thread-first
1391
- params
1392
- (cider--update-project-dir)
1393
- (cider--check-existing-session)
1394
- (cider--update-jack-in-cmd))))
1391
+ params
1392
+ (cider--update-project-dir)
1393
+ (cider--check-existing-session)
1394
+ (cider--update-jack-in-cmd))))
1395
1395
(nrepl-start-server-process
1396
1396
(plist-get params :project-dir )
1397
1397
(plist-get params :jack-in-cmd )
@@ -1418,13 +1418,13 @@ only when the ClojureScript dependencies are met."
1418
1418
(orig-buffer (current-buffer )))
1419
1419
; ; cider--update-jack-in-cmd relies indirectly on the above dynamic vars
1420
1420
(let ((params (thread-first
1421
- params
1422
- (cider--update-project-dir)
1423
- (cider--check-existing-session)
1424
- (cider--update-jack-in-cmd)
1425
- (cider--update-cljs-type)
1426
- ; ; already asked, don't ask on sibling connect
1427
- (plist-put :do-prompt nil ))))
1421
+ params
1422
+ (cider--update-project-dir)
1423
+ (cider--check-existing-session)
1424
+ (cider--update-jack-in-cmd)
1425
+ (cider--update-cljs-type)
1426
+ ; ; already asked, don't ask on sibling connect
1427
+ (plist-put :do-prompt nil ))))
1428
1428
(nrepl-start-server-process
1429
1429
(plist-get params :project-dir )
1430
1430
(plist-get params :jack-in-cmd )
@@ -1450,12 +1450,12 @@ server is created."
1450
1450
(ses-name (unless (nrepl-server-p other-repl)
1451
1451
(sesman-session-name-for-object 'CIDER other-repl))))
1452
1452
(thread-first
1453
- params
1454
- (cider--update-do-prompt)
1455
- (append other-params)
1456
- (plist-put :repl-init-function nil )
1457
- (plist-put :repl-type 'clj )
1458
- (plist-put :session-name ses-name)))))
1453
+ params
1454
+ (cider--update-do-prompt)
1455
+ (append other-params)
1456
+ (plist-put :repl-init-function nil )
1457
+ (plist-put :repl-type 'clj )
1458
+ (plist-put :session-name ses-name)))))
1459
1459
1460
1460
;;;### autoload
1461
1461
(defun cider-connect-sibling-cljs (params &optional other-repl )
@@ -1475,13 +1475,13 @@ server buffer, in which case a new session for that server is created."
1475
1475
(sesman-session-name-for-object 'CIDER other-repl))))
1476
1476
(cider-nrepl-connect
1477
1477
(thread-first
1478
- params
1479
- (cider--update-do-prompt)
1480
- (append other-params)
1481
- (cider--update-cljs-type)
1482
- (cider--update-cljs-init-function)
1483
- (plist-put :session-name ses-name)
1484
- (plist-put :repl-type 'cljs )))))
1478
+ params
1479
+ (cider--update-do-prompt)
1480
+ (append other-params)
1481
+ (cider--update-cljs-type)
1482
+ (cider--update-cljs-init-function)
1483
+ (plist-put :session-name ses-name)
1484
+ (plist-put :repl-type 'cljs )))))
1485
1485
1486
1486
;;;### autoload
1487
1487
(defun cider-connect-clj (&optional params )
@@ -1491,13 +1491,13 @@ prefix argument, prompt for all the parameters."
1491
1491
(interactive " P" )
1492
1492
(cider-nrepl-connect
1493
1493
(thread-first
1494
- params
1495
- (cider--update-project-dir)
1496
- (cider--update-host-port)
1497
- (cider--check-existing-session)
1498
- (plist-put :repl-init-function nil )
1499
- (plist-put :session-name nil )
1500
- (plist-put :repl-type 'clj ))))
1494
+ params
1495
+ (cider--update-project-dir)
1496
+ (cider--update-host-port)
1497
+ (cider--check-existing-session)
1498
+ (plist-put :repl-init-function nil )
1499
+ (plist-put :session-name nil )
1500
+ (plist-put :repl-type 'clj ))))
1501
1501
1502
1502
;;;### autoload
1503
1503
(defun cider-connect-cljs (&optional params )
@@ -1510,14 +1510,14 @@ parameters regardless of their supplied or default values."
1510
1510
(interactive " P" )
1511
1511
(cider-nrepl-connect
1512
1512
(thread-first
1513
- params
1514
- (cider--update-project-dir)
1515
- (cider--update-host-port)
1516
- (cider--check-existing-session)
1517
- (cider--update-cljs-type)
1518
- (cider--update-cljs-init-function)
1519
- (plist-put :session-name nil )
1520
- (plist-put :repl-type 'cljs ))))
1513
+ params
1514
+ (cider--update-project-dir)
1515
+ (cider--update-host-port)
1516
+ (cider--check-existing-session)
1517
+ (cider--update-cljs-type)
1518
+ (cider--update-cljs-init-function)
1519
+ (plist-put :session-name nil )
1520
+ (plist-put :repl-type 'cljs ))))
1521
1521
1522
1522
;;;### autoload
1523
1523
(defun cider-connect-clj&cljs (params &optional soft-cljs-start )
@@ -1527,15 +1527,15 @@ PARAMS is a plist optionally containing :host, :port, :project-dir and
1527
1527
non-nil, don't start if ClojureScript requirements are not met."
1528
1528
(interactive " P" )
1529
1529
(let* ((params (thread-first
1530
- params
1531
- (cider--update-project-dir)
1532
- (cider--update-host-port)
1533
- (cider--check-existing-session)
1534
- (cider--update-cljs-type)))
1530
+ params
1531
+ (cider--update-project-dir)
1532
+ (cider--update-host-port)
1533
+ (cider--check-existing-session)
1534
+ (cider--update-cljs-type)))
1535
1535
(clj-params (thread-first
1536
- params
1537
- copy-sequence
1538
- (map-delete :cljs-repl-type )))
1536
+ params
1537
+ copy-sequence
1538
+ (map-delete :cljs-repl-type )))
1539
1539
(clj-repl (cider-connect-clj clj-params)))
1540
1540
(when (if soft-cljs-start
1541
1541
(cider--check-cljs (plist-get params :cljs-repl-type ) 'no-error )
@@ -1606,9 +1606,9 @@ Params is a plist with the following keys (non-exhaustive)
1606
1606
(let ((default-directory proj-dir))
1607
1607
(hack-dir-local-variables-non-file-buffer )
1608
1608
(thread-first
1609
- params
1610
- (plist-put :project-dir proj-dir)
1611
- (plist-put :--context-buffer (current-buffer )))))))))
1609
+ params
1610
+ (plist-put :project-dir proj-dir)
1611
+ (plist-put :--context-buffer (current-buffer )))))))))
1612
1612
1613
1613
(defun cider--update-cljs-type (params )
1614
1614
" Update :cljs-repl-type in PARAMS."
@@ -1705,9 +1705,9 @@ PARAMS is a plist with the following keys (non-exhaustive list)
1705
1705
(if (equal " local-unix-domain-socket" (car endpoint))
1706
1706
(plist-put params :socket-file (cdr endpoint))
1707
1707
(thread-first
1708
- params
1709
- (plist-put :host (car endpoint))
1710
- (plist-put :port (cdr endpoint)))))))
1708
+ params
1709
+ (plist-put :host (car endpoint))
1710
+ (plist-put :port (cdr endpoint)))))))
1711
1711
1712
1712
(defun cider--update-cljs-init-function (params )
1713
1713
" Update repl type and any init PARAMS for cljs connections.
@@ -1729,20 +1729,20 @@ over to cljs.
1729
1729
(plist-put params :cider-repl-cljs-upgrade-pending nil )
1730
1730
1731
1731
(thread-first
1732
- params
1733
- (plist-put :cider-repl-cljs-upgrade-pending t )
1734
- (plist-put :repl-init-function
1735
- (lambda ()
1736
- (cider--check-cljs cljs-type)
1737
- (cider-nrepl-send-request
1738
- (list " op" " eval"
1739
- " ns" (cider-current-ns)
1740
- " code" repl-init-form)
1741
- (cider-repl-handler (current-buffer )))
1742
- (when (and (buffer-live-p nrepl-server-buffer)
1743
- cider-offer-to-open-cljs-app-in-browser)
1744
- (cider--offer-to-open-app-in-browser nrepl-server-buffer))))
1745
- (plist-put :repl-init-form repl-init-form))))))
1732
+ params
1733
+ (plist-put :cider-repl-cljs-upgrade-pending t )
1734
+ (plist-put :repl-init-function
1735
+ (lambda ()
1736
+ (cider--check-cljs cljs-type)
1737
+ (cider-nrepl-send-request
1738
+ (list " op" " eval"
1739
+ " ns" (cider-current-ns)
1740
+ " code" repl-init-form)
1741
+ (cider-repl-handler (current-buffer )))
1742
+ (when (and (buffer-live-p nrepl-server-buffer)
1743
+ cider-offer-to-open-cljs-app-in-browser)
1744
+ (cider--offer-to-open-app-in-browser nrepl-server-buffer))))
1745
+ (plist-put :repl-init-form repl-init-form))))))
1746
1746
1747
1747
(defun cider--check-existing-session (params )
1748
1748
" Ask for confirmation if a session with similar PARAMS already exists.
0 commit comments