-
-
Notifications
You must be signed in to change notification settings - Fork 652
Description
Expected behavior
when cljs REPL starts, it changes from pending-cljs in REPL buffer status line to cljs, and clojurescript source buffers get associated with this REPL.
Actual behavior
cljs stays in pending-cljs state and source buffers show cider[not connected]. C-z (go to repl), M-. (go to source), evaluating in source does not work. It says there is no REPL.
Steps to reproduce the problem
Minimal setup:
deps.edn
{}
shadow-cljs.edn
{:source-paths ["src"]}
src/cljs.cljs
(ns cljs)
(+ 1 7)
Then open src/cljs.cljs and cider-jack-in-cljs. I will get the REPL, browser tab is started, and I can evaluate things in REPL, but with the issue described at the top (pending-cljs, source buffers don't see the REPL).
I end up in the same situation when using cider-connect-cljs instead of cider-jack-in-cljs, or when I use figwheel-main instead of shadow-cljs.
Workaround:
I changed line 318 in cider-connection.el, in function
cider--connected-handler
(if (eq 'pending-cljs cider-repl-type)
(cider-set-repl-type 'cljs)
(cider-set-repl-type cider-repl-type))
CIDER version information
CIDER 1.5.0 (Strasbourg), nREPL 1.0.0
Clojure 1.11.1, Java 18.0.1
Emacs version
Emacs 28.1
Operating system
Ubuntu 22.04.1 LTS