This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-21
Channels
- # announcements (4)
- # aws (29)
- # aws-lambda (1)
- # babashka (21)
- # beginners (143)
- # calva (47)
- # cider (31)
- # clj-kondo (24)
- # cljsrn (4)
- # clojure (70)
- # clojure-australia (3)
- # clojure-czech (1)
- # clojure-europe (97)
- # clojure-greece (4)
- # clojure-nl (3)
- # clojure-uk (45)
- # clojurescript (70)
- # code-reviews (1)
- # conjure (7)
- # cursive (10)
- # datomic (13)
- # duct (5)
- # emacs (1)
- # fulcro (38)
- # graalvm (1)
- # graphql (9)
- # honeysql (13)
- # integrant (33)
- # jobs (14)
- # jobs-rus (1)
- # malli (7)
- # off-topic (72)
- # pathom (1)
- # re-frame (11)
- # reitit (9)
- # remote-jobs (2)
- # sci (11)
- # shadow-cljs (9)
- # sql (5)
- # tools-deps (5)
- # xtdb (6)
Hi there, let's say I want to embed my nrepl in the app. Then I want to be able to connect to it from either Calva or Cider (depending on the developer). Do they both support .nrepl.port
?
are you asking if starting an nrepl server uses the port found in .nrepl.port
or if when it starts it will write a file with the port its using into .nrepl.port
I think I answered by checking the start-server implementation...it does not save the file automatically unless launched via cmd line... I was more wondering if both editors can read that file
Calva looks for different nrepl port files depending on project type. This can also be configured using custom connect sequences: https://calva.io/connect-sequences/
i thought CIDER just watches the server output for a regex to grab the port. when you cider-connect it will just ask i thought. forgot how that works and if it actively looks for that file on cider-connect
i'm guessing its just the port in there? should be simple enough to spit that out when you start your server if you want
there's a delete on done option for files that will make sure to clean it up too to prevent it from laying around
thank you both, I did not notice that Calva page 😄
there might be an issue in the different spelling though...
I see nrepl.port
in calva but .nrepl-port
in https://github.com/nrepl/nrepl/blob/565cc075dc8ba1179e0a9d6b4ef8eb6ae9d47f54/src/clojure/nrepl/cmdline.clj#L420
I know it's configurable but it might be worth using the same name
about the latter, yes - there is a lot of output from the app and a terminal suits us better 😄
about the first question - maybe there is a mistake in that doc cause I see the right name under "Connecting"
found -> here it says nrepl.port
https://calva.io/connect-sequences/#settings-for-adding-custom-sequences
Just FYI it does not see that customizing the REPL port file works
oh it does ... sorry I needed a vector lol
this works "nReplPortFile": [".nrepl-port"],
@U0C8489U6 The only place I see nrepl-port
mentioned is for shadow-cljs, which actually names it like that. Is there some other place it says that?
that's the only place I saw that - and it confused me but maybe it's just me ... 😄
I have everything fully working and very smoothly now 😄
@U11BV7MTK yes my app now launches the nrepl server and writes the file (in dev mode). Calva picks the port from it when doing Connect to an existing REPL in project
The internal terminal i VS Code is pretty good, btw. And there is this button where it can be maximized and restored quickly. So to me jack-in makes sense since it uses this terminal. Just sayn’ 😃
I like that you can customize the project name thanks to calva.replConnectSequences
oh I found it also here https://github.com/BetterThanTomorrow/calva/blob/published/src/nrepl/connectSequence.ts#L126
there might be an issue in the different spelling though...
I see nrepl.port
in calva but .nrepl-port
in https://github.com/nrepl/nrepl/blob/565cc075dc8ba1179e0a9d6b4ef8eb6ae9d47f54/src/clojure/nrepl/cmdline.clj#L420
I know it's configurable but it might be worth using the same name