summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2018-04-21 13:07:47 +0300
committerBozhidar Batsov <bozhidar@batsov.com>2018-04-21 13:07:47 +0300
commitd8494c252efd31b28a6b58c9abea095facaaed7f (patch)
treec08c50c7e497044096c73cb8e9f3d663c42c7719
parentdea539cce60697c2302d453ccaaa037af97ed184 (diff)
[#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.
-rw-r--r--cider.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/cider.el b/cider.el
index 172449d1..e149f76e 100644
--- a/cider.el
+++ b/cider.el
@@ -604,6 +604,14 @@ dependencies."
;;; ClojureScript REPL creation
+(defcustom cider-check-cljs-repl-requirements t
+ "When non-nil will run the requirement checks for the different cljs repls.
+
+Generally you should not disable this unless you run into some faulty check."
+ :type 'boolean
+ :safe #'booleanp
+ :version '(cider . "0.17.0"))
+
(defun cider-verify-clojurescript-is-present ()
"Check whether ClojureScript is present."
(unless (cider-library-present-p "clojurescript")
@@ -775,14 +783,16 @@ Normally this would prompt for the ClojureScript REPL to start (e.g. Node,
Figwheel, etc), unless you've set `cider-default-cljs-repl'."
(interactive (list (cider-current-connection)))
;; We can't start a ClojureScript REPL without ClojureScript
- (cider-verify-clojurescript-is-present)
+ (when cider-check-cljs-repl-requirements
+ (cider-verify-clojurescript-is-present))
;; Load variables in .dir-locals.el into the server process buffer, so
;; cider-default-cljs-repl can be set for each project individually.
(hack-local-variables)
(let* ((cljs-repl-type (or cider-default-cljs-repl
(cider-select-cljs-repl)))
(cljs-repl-form (cider-cljs-repl-form cljs-repl-type)))
- (cider-verify-cljs-repl-requirements cljs-repl-type)
+ (when cider-check-cljs-repl-requirements
+ (cider-verify-cljs-repl-requirements cljs-repl-type))
;; if all the requirements are met we can finally proceed with starting
;; the ClojureScript REPL for `cljs-repl-type'
(let* ((nrepl-repl-buffer-name-template "*cider-repl%s(cljs)*")