This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (10)
- # aws-lambda (9)
- # babashka (14)
- # beginners (166)
- # calva (63)
- # chlorine-clover (4)
- # cider (40)
- # cljs-dev (4)
- # clojure (182)
- # clojure-europe (18)
- # clojure-italy (5)
- # clojure-nl (5)
- # clojure-spec (17)
- # clojure-uk (55)
- # clojurescript (11)
- # core-async (12)
- # crux (19)
- # cursive (23)
- # datascript (5)
- # datomic (19)
- # emacs (4)
- # fulcro (46)
- # graalvm (2)
- # hoplon (2)
- # joker (3)
- # juxt (1)
- # keechma (2)
- # leiningen (20)
- # malli (1)
- # meander (7)
- # nrepl (1)
- # off-topic (72)
- # pedestal (6)
- # re-frame (15)
- # reitit (7)
- # shadow-cljs (34)
- # sql (14)
- # testing (14)
- # tools-deps (11)
- # tree-sitter (1)
- # vim (14)
- # yada (3)
@qythium Looks reasonable to me. I don’t use/like spec, so improving the support for it has never been a priority for me.
How can I set the port for
cider-connect-sibling-cljs? I have already run
cider-jack-in-clj and need to connect to an already running cljs repl. However,
cider-connect-sibling-cljs refuses to use anything other than the same port number as the clj repl. Editing
.nrepl-port was no help. And
C-u also seems to have no effet
@tvaughan The sibling REPL is supposed to be on the same nREPL server by definition. That’s why you can’t specify this manually.
Keep in mind that in nREPL a single physical connection can host multiple logical connections (nREPL sessions).
From the perspective of CIDER the cljs connection is just a different nREPL session.
OK. I've misunderstood then. How do I run cider-jack-in-clj and connect to an already running cljs repl? I've tried other approaches and I always seem to lose the clj repl.
(defun aclaimant-jack-in-dashboard () (interactive) (cider-connect-cljs (list :host "localhost" :port 7888 :cljs-repl-type 'figwheel-connected 'project-dir "~/projects/aclaimant/acl")))
i also have a shadow-cljs project here. I threw in a deps.edn file and started a clojure repl. Then
shadow-cljs watch app from the command line,
m-x cider-connect-cljs selected localhost, then the port for shadow and i'm up and running. I'm not seeing any issue to this workflow? Did i miss something?
@U11BV7MTK This is exactly what I did. But after cider connects to the cljs repl I lose the clj repl. I can no longer evaluate clojure expressions/buffers
but need to mention that there is a limitation that CIDER isn't aware of clj versus cljs repls in the same project. its only aware of the last repl
so if you need to evaluate clojure, the last repl to have focus needs to be your clojure repl, and if you need to evaluate cljs, the last repl to have focus needs to be your cljs repl
basically it asks of all the connections for the latest repl, and if its a clojure one, it thinks you don't have a cljs repl at all so things appear disconnected
Actually, the problem is that when you do two separate connections you end up with independent sesman sessions, that have just one connection each.
@U051BLM8F ah thanks. i've never really gotten deep into sesman. but i think the observed behavior here is the same regardless. That api needs to be opened up for us so we can track the "latest" clj and latest cljs repls
Hmmm I can't focus the cljs repl. I can evaluate expressions in each repl directly, however, evaluating something like
(js/console.log "Hi") in a .cljs file is sent to the clj repl
Not our finest writing, but I think it gives a good overview of session/connection management.
Yes. Especially this
The current REPL is the most relevant REPL from the current session. REPL relevance is determined by the type of the current buffer.
C-c C-s w lists two but the cljs session is linked to a directory path that's totally wrong
OK. It's working now. I don't know why it wasn't working. I think maybe it was because I connected to the cljs repl first using cider and then in a browser. It seems to only work if I connect to the cljs in a browser first and then using cider. I don't have to focus the repl either. Cider chooses the correct repl correctly based on the current buffer type
curious, why does cider have 3-4 different keybindings for the same command for many commands?
C-c C-e cider-eval-last-sexp C-c C-f cider-pprint-eval-defun-at-point C-c C-j cider-insert-commands-map C-c C-k cider-load-buffer