This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-07
Channels
- # adventofcode (94)
- # babashka (29)
- # babashka-sci-dev (2)
- # beginners (103)
- # calva (15)
- # cider (17)
- # clj-kondo (62)
- # cljsrn (24)
- # clojars (13)
- # clojure (97)
- # clojure-belgium (3)
- # clojure-berlin (3)
- # clojure-czech (1)
- # clojure-europe (68)
- # clojure-nl (1)
- # clojure-norway (3)
- # clojure-seattle (3)
- # clojure-uk (1)
- # clojurescript (7)
- # community-development (29)
- # conjure (2)
- # cursive (14)
- # data-science (15)
- # emacs (3)
- # graphql (10)
- # gratitude (1)
- # holy-lambda (32)
- # hoplon (21)
- # hyperfiddle (2)
- # jobs (2)
- # joyride (36)
- # lsp (4)
- # meander (13)
- # off-topic (203)
- # pathom (3)
- # polylith (6)
- # re-frame (4)
- # reagent (1)
- # reitit (28)
- # releases (1)
- # shadow-cljs (16)
- # slack-help (2)
- # sql (27)
- # vim (2)
did anything change regarding cider-register-cljs-repl-type
? we have a custom repl type (shadow-repl) with has an init form that used to be evaluated when the repl starts.
Since today probably cider prints in the repl buffer the form it should evaluate, but is not evaluating it anymore.
actually I wonder if it's related with https://github.com/clojure-emacs/cider/issues/3236 since now it looks like the repl type is wrong even after starting it, not just when I switch from a code buffer to the repl
@andrea.crotti I'm also experiencing this. my shadow cljs repls become clj repls and then cannot evaluate cljs code anymore. I reverted cider to commit "5064287ba71c4c8ede169b0f561d707f4a365c55"
to get it working again.
as a side note, what's the easy way to use cider from source with use-package?
I tried to pin it to stable as well actually but it didn't really work either
no I'm not using straight
;; cider-repl--state-handler sets it to clj when we eval
;; cljs.core/demunge
;; this is why we see the broken behavior (new)
cider-set-repl-type("clj")
cider-repl--state-handler((dict "changed-namespaces" (dict) "id" "11" "repl-type" "clj" "session" "f5122c13-5224-482a-8a35-d243e1d80357" "status" ("state")))
run-hook-with-args(cider-repl--state-handler (dict "changed-namespaces" (dict) "id" "11" "repl-type" "clj" "session" "f5122c13-5224-482a-8a35-d243e1d80357" "status" ("state")))
nrepl-client-filter(#<process nrepl-connection<5>> "oneeed18:changed-namespacesde2:id2:119:repl-type3:...")
accept-process-output(nil 0.01)
nrepl-send-sync-request(("op" "eval" "code" "cljs.core/demunge") #<buffer *cider-repl clojure/acme-app:localhost:43155(cljs:shadow)*> nil tooling)
nrepl-sync-request:eval("cljs.core/demunge" #<buffer *cider-repl clojure/acme-app:localhost:43155(cljs:shadow)*> nil tooling)
@U051BLM8F
;; how does it decide the repl-type here?
(nrepl-dbind-response response (repl-type changed-namespaces)
)
checking in cider-nrepl and it comes from (cljs/grab-cljs-env msg)
maybe I need to say something in the message that I want to eval cljs or something
pretty sure from ciders perspective the difference is whether ns
is passed to the eval request. When I pass cider-current-ns
I get repl-type cljs
, else clj
. I suppose this is basically a feature that is good.
I will try around to figure out the correct way to check demunge
being present.
The repl-type is the responses comes from the track-state
middleware in cider-nrepl
.
This was considered the only reliable way to be sure that a connection's type actually got changed back in the day - is the ClojureScript env actually in the session or no.
I have an okay fix I think. On the level of detail I understand it, I could fix it by changing the ordering so the "demunge" eval call is not the last, but the repl-init-form is the last (which sets the repl type). https://github.com/clojure-emacs/cider/pull/3282