This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-11
Channels
- # adventofcode (33)
- # babashka (1)
- # beginners (11)
- # biff (3)
- # calva (2)
- # cider (24)
- # clj-kondo (9)
- # cljfx (5)
- # clojure (39)
- # clojure-austin (2)
- # clojure-europe (11)
- # clojure-nl (1)
- # clojure-norway (22)
- # clojure-uk (10)
- # community-development (18)
- # data-science (24)
- # datahike (3)
- # events (3)
- # hyperfiddle (11)
- # lsp (22)
- # malli (3)
- # matrix (1)
- # off-topic (24)
- # other-languages (3)
- # overtone (7)
- # pathom (5)
- # reitit (2)
- # shadow-cljs (34)
- # sql (20)
- # squint (13)
👋 I have a project for which I use jack-in
for the clj REPL, cider-connect-cljs for the cljs one. I added (setq cider-merge-sessions 'project)
for that to work but now it seems like my sessions are not isolated per project, i.e. in my advent-of-code REPL I get auto-connected to the work one and vice-versa. am I understanding that var wrong?
I also don't get the difference between
Symbol 'host' combines all sessions of a project associated with the same host.
Symbol 'project' combines all sessions of a project.
what does host
mean?cider-jack-in-clj&cljs
might be your best bet if you don't wish to tinker much at the Sesman level.
I use it all the time 🙂
yeah, the README for the project recommends booting the cljs REPL using a command line shortcut. I always blindly believed it was doing some more work in the background, but just dug and it seems not! let me try the double jack in
never mind. I now remember why I do that:
In the case of using separate config files for the clj and cljs dependencies (e.g. clj dependencies in deps.edn and cljs dependencies in shadow-cljs.edn) it is currently impossible to group those two repls in the same session. However, this can be worked around with cider-merge-sessions. Setting it to 'host will combine all sessions associated with the same host within a project. Setting it to 'project will combine all sessions in the same project.
in this particular project we use lein
for clj, shadow
through deps.edn
for cljsYou might not want to group those two repls in the same session
anyway, let's see
Are you working with .cljc files?
So if you jack in once for clj, another time for cljs, each evaluation for a given .clj or .cljs buffer should be routed to the right repl if cider-merge-sessions
is nil (default value)
Is that not the case?
trying that now, but got The required namespace "devtools.preload" is not available.
when doing cider-jack-in-cljs through emacs instead of connecting. let me see what's up with that
WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it! (More information)
To quit, type: :cljs/quit
[:selected :dev]WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 3.10.0 and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.shadow.user>
Alright, happy to read that! If this doesn't work smoothly please raise an issue, this use case (.clj / .cljs files with no possible ambiguity) should be supported OOTB
For completeness sake, as of lately you can choose a fixed destination for .cljc files - it's the cider-clojurec-eval-destination
defcustom: https://docs.cider.mx/cider/cljs/up_and_running.html#working-with-cljc-files