Skip to content

Commit b9e244e

Browse files
committed
3834 Update changelog, add test for new argument in cider-repls
1 parent b5608dd commit b9e244e

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
- Bump the injected `nrepl` to [1.4.0](https://github.com/nrepl/nrepl/blob/master/CHANGELOG.md#140-2025-09-02).
1010
- Bump the injected `piggieback` to [0.6.1](https://github.com/nrepl/piggieback/blob/master/CHANGES.md#061-2025-12-31).
11-
- [#3834](https://github.com/clojure-emacs/cider/issues/3834): Change cider-ns-refresh to always use Clojure REPL
1211

1312
### Bugs fixed
1413

1514
- [#3832](https://github.com/clojure-emacs/cider/issues/3832): Fix nrepl--eval-request sending duplicate info.
1615
- [#3837](https://github.com/clojure-emacs/cider/issues/3837): Fix broken stacktrace response when C-c C-p throws an exception.
16+
- [#3834](https://github.com/clojure-emacs/cider/issues/3834): Fix cider-ns-refresh throwing an error when a clojure REPL exists, but cider-current-repl does not support the required operations.
1717

1818
## 1.19.0 (2025-07-10)
1919

doc/modules/ROOT/pages/usage/cider_mode.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ kbd:[C-u C-c C-c]
175175

176176
| `cider-ns-refresh`
177177
| kbd:[C-c M-n (M-)r]
178-
| Reload all modified files on the classpath. If invoked with a prefix argument, reload all files on the classpath. If invoked with a double prefix argument, clear the state of the namespace tracker before reloading. Uses a clojure REPL whenever one exists.
178+
| Reload all modified files on the classpath. If invoked with a prefix argument, reload all files on the classpath. If invoked with a double prefix argument, clear the state of the namespace tracker before reloading.
179179

180180
| `cider-doc`
181181
| kbd:[C-c C-d d] +

test/cider-connection-tests.el

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@
365365
(expect (cider-repls) :to-have-same-items-as (list l1 l2)))))))))
366366

367367
(describe "killed buffers"
368-
(it "do not show up in it"
368+
(it "do not show up in it
369+
"
369370
(let ((default-directory (expand-file-name "/tmp/some-dir")))
370371
(cider-test-with-buffers
371372
(a b)
@@ -398,7 +399,25 @@
398399
(append cider-connection-capabilities '(cljs))))
399400

400401
(expect (cider-repls) :to-equal (list a b))
401-
(sesman-unregister 'CIDER session)))))))
402+
(sesman-unregister 'CIDER session))))))
403+
404+
(describe "when ops-to-support is not nil"
405+
:var (nrepl-ops)
406+
(it "only returns the repls that support the given ops"
407+
(let ((proj-dir (expand-file-name "/tmp/proj-dir")))
408+
(let ((default-directory proj-dir))
409+
(with-repl-buffer ses-name 'clj b1
410+
(setq nrepl-ops (nrepl-dict "refresh" 't))
411+
(with-repl-buffer ses-name 'clj b2
412+
(with-repl-buffer ses-name 'cljs b3
413+
(expect (cider-repls nil nil '("refresh")) :to-equal (list b1))))))))
414+
(it "raises a user error when ensure is not nil and no repl that supports the ops exist"
415+
(let ((proj-dir (expand-file-name "/tmp/proj-dir")))
416+
(let ((default-directory proj-dir))
417+
(with-repl-buffer ses-name 'clj b1
418+
(with-repl-buffer ses-name 'cljs b2
419+
(expect (cider-repls nil 't '("refresh")) :to-throw 'user-error))))))))
420+
402421

403422
(describe "cider--connection-info"
404423
(before-each

0 commit comments

Comments
 (0)