Skip to content

Commit d8494c2

Browse files
committed
[#2272] Add a workaround for broken library presence detection on JDK 9+
If you run into such problems now you can turn off the requirements verification with a defcustom.
1 parent dea539c commit d8494c2

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

cider.el

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,14 @@ dependencies."
604604

605605
;;; ClojureScript REPL creation
606606

607+
(defcustom cider-check-cljs-repl-requirements t
608+
"When non-nil will run the requirement checks for the different cljs repls.
609+
610+
Generally you should not disable this unless you run into some faulty check."
611+
:type 'boolean
612+
:safe #'booleanp
613+
:version '(cider . "0.17.0"))
614+
607615
(defun cider-verify-clojurescript-is-present ()
608616
"Check whether ClojureScript is present."
609617
(unless (cider-library-present-p "clojurescript")
@@ -775,14 +783,16 @@ Normally this would prompt for the ClojureScript REPL to start (e.g. Node,
775783
Figwheel, etc), unless you've set `cider-default-cljs-repl'."
776784
(interactive (list (cider-current-connection)))
777785
;; We can't start a ClojureScript REPL without ClojureScript
778-
(cider-verify-clojurescript-is-present)
786+
(when cider-check-cljs-repl-requirements
787+
(cider-verify-clojurescript-is-present))
779788
;; Load variables in .dir-locals.el into the server process buffer, so
780789
;; cider-default-cljs-repl can be set for each project individually.
781790
(hack-local-variables)
782791
(let* ((cljs-repl-type (or cider-default-cljs-repl
783792
(cider-select-cljs-repl)))
784793
(cljs-repl-form (cider-cljs-repl-form cljs-repl-type)))
785-
(cider-verify-cljs-repl-requirements cljs-repl-type)
794+
(when cider-check-cljs-repl-requirements
795+
(cider-verify-cljs-repl-requirements cljs-repl-type))
786796
;; if all the requirements are met we can finally proceed with starting
787797
;; the ClojureScript REPL for `cljs-repl-type'
788798
(let* ((nrepl-repl-buffer-name-template "*cider-repl%s(cljs)*")

0 commit comments

Comments
 (0)