Skip to content

Commit

Permalink
Init the debugger at the end to avoid concurrent middleware loading
Browse files Browse the repository at this point in the history
  • Loading branch information
vspinu committed Aug 22, 2017
1 parent 47953f2 commit 721440b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -892,10 +892,15 @@ buffer."
(cider--check-required-nrepl-version)
(cider--check-clojure-version-supported)
(cider--check-middleware-compatibility)
(cider--debug-init-connection)
(cider--subscribe-repl-to-server-out)
(when cider-auto-mode
(cider-enable-on-existing-clojure-buffers))
;; Middleware on cider-nrepl side is loaded dynamically on first
;; usage. Loading middleware concurrently can lead to confusing issues
;; (likely a clojure bug). Debug middleware is heavy, so enable it at the
;; end and hope for the best. Ideally, the sequence of middleware loading
;; should be done in a deferred chain.
(cider--debug-init-connection)
(run-hooks 'cider-connected-hook)))

(defun cider--disconnected-handler ()
Expand Down

0 comments on commit 721440b

Please sign in to comment.