Skip to content

Commit 7fc5688

Browse files
committed
[Fix #3182] Make cider-fallback-eval:classpath safer
Basically this should be a no-op if the runtime is not JVM Clojure.
1 parent 69d3748 commit 7fc5688

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
### Bugs fixed
66

77
* [#3195](https://github.com/clojure-emacs/cider/issues/3195): Revert the change that resulted in `(error "Cyclic keymap inheritance")` on `cider-test-run-test`.
8+
* [#3182](https://github.com/clojure-emacs/cider/issues/3182): Don't try to invoke
9+
JVM-specific code outside of JVM Clojure.
810

911
## 1.4.0 (2022-05-02)
1012

cider-client.el

+7-6
Original file line numberDiff line numberDiff line change
@@ -593,12 +593,13 @@ Do nothing if PATH is already absolute."
593593
594594
Sometimes the classpath contains entries like src/main and we need to
595595
resolve those to absolute paths."
596-
(let ((classpath (thread-first "(seq (.split (System/getProperty \"java.class.path\") \":\"))"
597-
(cider-sync-tooling-eval)
598-
(nrepl-dict-get "value")
599-
read))
600-
(project (clojure-project-dir)))
601-
(mapcar (lambda (path) (cider--get-abs-path path project)) classpath)))
596+
(when (cider-runtime-clojure-p)
597+
(let ((classpath (thread-first "(seq (.split (System/getProperty \"java.class.path\") \":\"))"
598+
(cider-sync-tooling-eval)
599+
(nrepl-dict-get "value")
600+
read))
601+
(project (clojure-project-dir)))
602+
(mapcar (lambda (path) (cider--get-abs-path path project)) classpath))))
602603

603604
(defun cider-classpath-entries ()
604605
"Return a list of classpath entries."

0 commit comments

Comments
 (0)