Skip to content

Commit

Permalink
[Fix #3182] Make cider-fallback-eval:classpath safer
Browse files Browse the repository at this point in the history
Basically this should be a no-op if the runtime is not JVM Clojure.
  • Loading branch information
bbatsov committed May 15, 2022
1 parent 69d3748 commit 7fc5688
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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)

Expand Down
13 changes: 7 additions & 6 deletions cider-client.el
Expand Up @@ -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."
Expand Down

0 comments on commit 7fc5688

Please sign in to comment.