chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
2020-07-15T23:17:55.272Z

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}"]}}

2020-07-15T23:18:21.272400Z

I start the socket repl with lein with-profile +socket repl

2020-07-15T23:18:35.272700Z

But, I am getting an nREPL that starts up

2020-07-15T23:19:01.273100Z

nREPL server started on port 53093 on host 127.0.0.1 - <nrepl://127.0.0.1:53093>
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

2020-07-15T23:20:01.274300Z

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.

2020-07-15T23:20:33.274700Z

This successfully starts a socket REPL: clojure -J-Dclojure.server.myrepl="{:port 50505, :accept,clojure.core.server/repl}"

2020-07-15T23:21:12.275500Z

But then I do not have the benefits of lein adding the source path and whatnot to what is otherwise lein-based development.

2020-07-15T23:21:38.276200Z

I am hoping someone can offer some tips on how to diagnose this.

seancorfield 2020-07-15T23:29:27.276800Z

@jhemann What makes you think the Socket REPL is not being started with Leiningen?

2020-07-15T23:31:00.278Z

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...

seancorfield 2020-07-15T23:31:34.278800Z

lein repl always starts an nREPL server and that port number is for nREPL.

2020-07-15T23:34:23.279800Z

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.

seancorfield 2020-07-15T23:35:27.280600Z

The Socket REPL is started by Clojure, because of the JVM option -- Leiningen and nREPL know nothing about it.

1
seancorfield 2020-07-15T23:47:58.282100Z

(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)

seancorfield 2020-07-15T23:48:31.282700Z

(and that's one more reason that I'm glad I stopped using Leiningen back in 2015! 🙂 )