cider-default-connection deprecated in cider 0.18
Closed this issue · 4 comments
Since cider has moved to sesman to handle connections to the repl, when using squiggly-clojure I am getting the following error:
Error while checking syntax automatically: (void-function cider-default-connection)
While compiling squiggly-clojure I have these messages in my *Compile-Log*
In flycheck-clojure-may-use-cider-checker:
flycheck-clojure.el:93:29:Warning: ‘cider-default-connection’ is an obsolete
function (as of 0.18); see sesman.
In end of data:
flycheck-clojure.el:223:1:Warning: the function ‘cider-default-connection’ is
not known to be defined.
I had a quick investigation of this and seem to have it working by changing one of the functions in flycheck-clojure.el
(defun flycheck-clojure-may-use-cider-checker ()
"Determine whether a cider checker may be used.
Checks for `cider-mode', and a current nREPL connection.
Standard predicate for cider checkers."
(let ((connection-buffer (cider-current-repl)))
(and (bound-and-true-p cider-mode)
connection-buffer
(buffer-live-p (get-buffer connection-buffer))
(clojure-find-ns))))
Seems like cider's session management was updated and a lot of the API was trimmed (you can see the commit here). You can pull the repl buffer using the new cider-current-repl
function rather than (cider-default-connection :no-error)
which was being used previously.
I'm not involved in this project so maybe one of the maintainers wants to turn this into a PR (I'm not sure if theres other bugs introduced from the cider API refactor), but you can at least do this for a temporary fix.
Thanks for looking into this. I've merged your change, and it should make to melpa in a day or two.
Has this been resolved? I'm facing the same issue.