Fork me on GitHub
#dev-tooling
<
2022-11-29
>
Benjamin15:11:08

cljs.core/inc the client can check this -> means the server has cljs available? When I put it like that then I get the answer is yes

borkdude15:11:18

yeah, sounds good

mkvlr16:11:59

@benjamin.schwerdtner should the client check this or rather the server?

mkvlr16:11:35

if we do cljs according to the nrepl protocol, I feel the upgrade and check should already happen on the server

Benjamin16:11:07

context, in the end, is to say if a .cljs file is handled by which repl

Benjamin16:11:27

what is

cljs according to the nrepl protocol
I think I missed that

mkvlr16:11:15

currently a lot of the upgrade process (upgrading a JVM Clojure repl to a ClojureScript one) is driven by the client (e.g. cider)

mkvlr16:11:29

whereas I feel it might be worth exploring if we can move that into to server, e.g. you say what server to start and then you just connect to it from cider, where all the upgrade complexity is contained to the sever and doesn’t need to be implemented in every client. Does that make sense?

Benjamin16:11:16

Oh yes

👍 1
Benjamin16:11:07

Here is 1 idea to fix some of the upgrade complexity + "selecting things" in the editor. We add a file like project-root/ nrepl.edn

{:nrepl/run-command
 ;; potentially you run clj with an alias an setup things similar to this
 ;; 
 "nbb nrepl-server :port 1779"
 :nrepl/port 1779
 :nrepl/host "localhost"}
Now I can say something like =cider-jack-in-dwim= and it starts a
repl.
It can even first try to connect to the port, if it is running.

** pros
Less selecting
Implementation is straightforward

** cons
1 more file

Benjamin16:11:07

Here is 1 idea to fix some of the upgrade complexity + "selecting things" in the editor. We add a file like project-root/ nrepl.edn

{:nrepl/run-command
 ;; potentially you run clj with an alias an setup things similar to this
 ;; 
 "nbb nrepl-server :port 1779"
 :nrepl/port 1779
 :nrepl/host "localhost"}
Now I can say something like =cider-jack-in-dwim= and it starts a
repl.
It can even first try to connect to the port, if it is running.

** pros
Less selecting
Implementation is straightforward

** cons
1 more file