This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # babashka (28)
- # beginners (212)
- # calva (13)
- # clara (3)
- # clj-kondo (39)
- # cljsrn (1)
- # clojure (16)
- # clojure-australia (1)
- # clojure-europe (11)
- # clojure-nl (2)
- # clojure-spec (9)
- # clojure-uk (8)
- # clojurescript (66)
- # cloverage (1)
- # code-reviews (25)
- # cursive (11)
- # data-science (2)
- # datomic (118)
- # events (1)
- # garden (2)
- # improve-getting-started (1)
- # introduce-yourself (1)
- # jobs (4)
- # missionary (5)
- # numerical-computing (1)
- # off-topic (5)
- # pathom (3)
- # polylith (71)
- # re-frame (99)
- # reagent (17)
- # remote-jobs (5)
- # shadow-cljs (35)
- # tools-deps (5)
- # xtdb (4)
I was watching Sean Corfield's video about REPL driven development and I'm trying to achieve the same kind of workflow where the REPL is started outside the editor and is a long-living process. I grabbed his
dev.clj that loads
rebel-readline , and connects both to a socket REPL. What I'm struggling with at the moment is that I can't figure out how to get Calva to connect to this socket REPL. I select the "Calva: Connect to running REPL server in the project" command, and in the REPL pane it shows that it's trying to connect with nREPL. I'm new, so I think the issue is that my REPL that I've started is a plain socket REPL, whereas Calva is trying to connect to an nREPL server. Is that correct? Is there a way to connect to just a bare socket server, or should I focus on figuring out how to start the REPL as an nREPL server instead?
You are correct about Calva trying to connect to an nREPL server. There is no support for bare sockets. @U04V70XH6 is using Clover together with Calva, where Clover is providing the REPL connection. I suggest you figure out how to start an nREPL server. That is pretty easy. Calva has a command for copying the command it uses for starting the REPL. Search the command palette for ”copy jack-in” and you should find it. Then start your REPL using that command.
deps.edn used to have an
:nrepl alias so you could start a basic nREPL server but I never integrated it with Rebel Readline or my
:dev/repl alias because I haven't used nREPL for years (and in my last round of
deps.edn changes, I removed the
:nrepl alias because I never use it).
There are a few "short bites" videos of my workflow at https://www.youtube.com/c/SeanCorfield_A and at some point I will make some more, but it's just not a medium I enjoy working with.
When using jack-in I don’t see it loading my .bash_profile in the terminal window it starts. It has commands I need to run before starting the REPL, so wondering how to fix that.
There is currently no way to run a command before the REPL is started. What does your command do?
It loads envars specific to the project I’m in, so without that I can’t really make use of the started REPL.
afaict new terminals I create in VS Code run the script correctly, but the jack-in REPL does not.
You have two options, I think:
1. Use the
jackInEnv setting to provide the env vars that way.
2. Use the Copy Jack-in Command to Clipboard command to get the command that Calva would use to start the REPL. Then Connect to a running REPL.
Ok, yeah I'd need to use option two as the utility is it loads different envars based on the directory I'm on.
A particular project stays in the same directory, though, right? So if you use Workspace settings for setting
jackInEnv it would more be similar. Even though it would also be duplicating the setup. Anyway, make a mental note about running that Jack-in Command to Clipboard command now and then to stay up-to-date with any requirements Calva might have about dependencies.