branch: elpa/cider commit 7fc568809cb2afc1f42abc70066d3cb7029e54c7 Author: Bozhidar Batsov <bozhi...@batsov.dev> Commit: Bozhidar Batsov <bozhi...@batsov.dev>
[Fix #3182] Make cider-fallback-eval:classpath safer Basically this should be a no-op if the runtime is not JVM Clojure. --- CHANGELOG.md | 2 ++ cider-client.el | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a17b97bc0..cb9a693e41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ ### Bugs fixed * [#3195](https://github.com/clojure-emacs/cider/issues/3195): Revert the change that resulted in `(error "Cyclic keymap inheritance")` on `cider-test-run-test`. +* [#3182](https://github.com/clojure-emacs/cider/issues/3182): Don't try to invoke +JVM-specific code outside of JVM Clojure. ## 1.4.0 (2022-05-02) diff --git a/cider-client.el b/cider-client.el index 00c906077a..174081626f 100644 --- a/cider-client.el +++ b/cider-client.el @@ -593,12 +593,13 @@ Do nothing if PATH is already absolute." Sometimes the classpath contains entries like src/main and we need to resolve those to absolute paths." - (let ((classpath (thread-first "(seq (.split (System/getProperty \"java.class.path\") \":\"))" - (cider-sync-tooling-eval) - (nrepl-dict-get "value") - read)) - (project (clojure-project-dir))) - (mapcar (lambda (path) (cider--get-abs-path path project)) classpath))) + (when (cider-runtime-clojure-p) + (let ((classpath (thread-first "(seq (.split (System/getProperty \"java.class.path\") \":\"))" + (cider-sync-tooling-eval) + (nrepl-dict-get "value") + read)) + (project (clojure-project-dir))) + (mapcar (lambda (path) (cider--get-abs-path path project)) classpath)))) (defun cider-classpath-entries () "Return a list of classpath entries."