Skip to content

Commit f357cf0

Browse files
committed
Update cider-sync-request:resources-list to track some cider-nrepl changes
The return value for the "resources-list" op changed in clojure-emacs/cider-nrepl#459 It used to return just a list of relative paths, now it returns a list of dictionaries that include both the relative and the absolute path to a resource.
1 parent 4036705 commit f357cf0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

cider-client.el

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,10 +1045,13 @@ returned."
10451045
(nrepl-dict-get "resource-path")))
10461046

10471047
(defun cider-sync-request:resources-list ()
1048-
"Return a list of all resources on the classpath."
1049-
(thread-first '("op" "resources-list")
1050-
(cider-nrepl-send-sync-request)
1051-
(nrepl-dict-get "resources-list")))
1048+
"Return a list of all resources on the classpath.
1049+
1050+
The result entries are relative to the classpath."
1051+
(when-let* ((resources (thread-first '("op" "resources-list")
1052+
(cider-nrepl-send-sync-request)
1053+
(nrepl-dict-get "resources-list"))))
1054+
(seq-map (lambda (resource) (nrepl-dict-get resource "relpath")) resources)))
10521055

10531056
(defun cider-sync-request:format-code (code)
10541057
"Perform nREPL \"format-code\" op with CODE."

0 commit comments

Comments
 (0)