This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-15
Channels
- # admin-announcements (1)
- # announcements (8)
- # babashka (6)
- # beginners (70)
- # bristol-clojurians (1)
- # chlorine-clover (15)
- # cider (3)
- # cljs-dev (2)
- # cljsrn (27)
- # clojure (249)
- # clojure-europe (19)
- # clojure-italy (2)
- # clojure-nl (12)
- # clojure-spec (11)
- # clojure-uk (42)
- # clojuredesign-podcast (6)
- # clojurescript (39)
- # community-development (1)
- # conjure (43)
- # cursive (37)
- # data-science (1)
- # datomic (3)
- # duct (16)
- # figwheel-main (23)
- # fulcro (3)
- # instaparse (5)
- # java (5)
- # jobs (1)
- # jobs-discuss (1)
- # malli (11)
- # off-topic (27)
- # re-frame (32)
- # reagent (5)
- # reitit (2)
- # rum (15)
- # shadow-cljs (24)
- # spacemacs (7)
- # sql (5)
- # test-check (3)
- # tools-deps (5)
This is not about Chlorine per se, but I am experiencing an issue starting a socket REPL using lein 2.9.1 (and also tested 2.9.4). I have this in my ~/.lein/profiles.clj
{:socket
{:jvm-opts ["-Dclojure.server.myrepl={:port 50505, :accept clojure.core.server/repl}"]}}
nREPL server started on port 53093 on host 127.0.0.1 -
REPL-y 0.4.4, nREPL 0.7.0
Clojure 1.10.1
OpenJDK 64-Bit Server VM 11.0.4+11-LTS
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
If I put something wrong in my profile then lein repl errors out, so I know my profile is being read. In this case, I am not seeing any errors, just getting an nREPL starting instead of the socket REPL I need for Chlorine.
This successfully starts a socket REPL: clojure -J-Dclojure.server.myrepl="{:port 50505, :accept,clojure.core.server/repl}"
But then I do not have the benefits of lein adding the source path and whatnot to what is otherwise lein-based development.
@jhemann What makes you think the Socket REPL is not being started with Leiningen?
Seeing the nREPL and the port being 53093. Maybe I am being dense though, and lein is starting an nREPL but also a socket REPL on the port I chose, 50505? Let me check...
lein repl
always starts an nREPL server and that port number is for nREPL.
OK, false alarm. There is a socket REPL on 50505. I was thrown off by seeing the nREPL always starting. Thanks for the quick response @seancorfield.
The Socket REPL is started by Clojure, because of the JVM option -- Leiningen and nREPL know nothing about it.
(one thing to be aware of: if you start lein with-profile +socket repl
outside a project, it seems to only start one JVM and therefore it does not pick up the additional JVM options from the profile)
(and that's one more reason that I'm glad I stopped using Leiningen back in 2015! 🙂 )