Function: cider--maybe-get-state-for-shadow-cljs

cider--maybe-get-state-for-shadow-cljs is a byte-compiled function defined in cider-repl.el.

Signature

(cider--maybe-get-state-for-shadow-cljs BUFFER &optional ERR)

Documentation

Refresh the changed namespaces metadata given BUFFER and ERR (stderr string).

This is particularly necessary for shadow-cljs because:

* it has a particular nREPL implementation; and
* one may have saved files (which triggers recompilation,
  and therefore the need for recomputing changed namespaces)
  without sending a nREPL message (this can particularly happen
  if the file was edited outside Emacs).

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-repl.el
(defun cider--maybe-get-state-for-shadow-cljs (buffer &optional err)
  "Refresh the changed namespaces metadata given BUFFER and ERR (stderr string).

This is particularly necessary for shadow-cljs because:

* it has a particular nREPL implementation; and
* one may have saved files (which triggers recompilation,
  and therefore the need for recomputing changed namespaces)
  without sending a nREPL message (this can particularly happen
  if the file was edited outside Emacs)."
  (with-current-buffer buffer
    (when (and (eq cider-repl-type 'cljs)
               (eq cider-cljs-repl-type 'shadow)
               (not cider-repl-cljs-upgrade-pending)
               (if err
                   (string-match-p "Build completed\\." err)
                 t))
      (cider--maybe-get-state-cljs))))