This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-03
Channels
- # aleph (6)
- # announcements (4)
- # babashka (73)
- # beginners (117)
- # calva (25)
- # chlorine-clover (59)
- # cider (21)
- # clara (3)
- # cljdoc (8)
- # cljs-dev (54)
- # cljsrn (15)
- # clojure (65)
- # clojure-france (5)
- # clojure-spec (3)
- # clojure-uk (13)
- # clojurescript (79)
- # conf-proposals (1)
- # conjure (17)
- # core-logic (11)
- # datomic (21)
- # fulcro (82)
- # graalvm (11)
- # helix (7)
- # jobs-discuss (11)
- # joker (2)
- # juxt (3)
- # local-first-clojure (1)
- # luminus (5)
- # nrepl (61)
- # off-topic (12)
- # pathom (70)
- # re-frame (3)
- # reitit (3)
- # rum (1)
- # shadow-cljs (58)
- # sql (1)
- # tools-deps (26)
- # xtdb (3)
hi, I'm new to clojure from Java and I would like to know how to embed nrepl in a production java app and what gui tools can I use to connect to it. what options are there for security (authentication) ?
the default transports are all socket based. What people typically do is to allow connection from local only, without security, then reply on SSH to provide security
there is https://github.com/nrepl/drawbridge, which gives access over https. don't think there's any built in security, but you are free to add your own there.
in term of GUI tools, the best bet are the ones built into the major clojure dev tools, e.g. Cursive for IntelliJ or Calva for VSCode
I'm sure standalone tools exist, but that's not a common way to use nREPL, so doubt they are too well developed
Here's a list of clients: https://nrepl.org/nrepl/0.7.0/usage/clients.html
I did manage to do what I was aiming for https://github.com/netdava/ofbiz-clojure-repl
I'm working on adopting clojure inside some projects and this is something that I would like to experiment with: • make the application start with nrepl • expose some 'context' that I can use to interact with the application runtime - like a spring application context
ideally this should be usable from the browser but connecting from ide would be ok too.
for whom it might concern: just found https://github.com/tstout/spring-repl which is a nice start, please share how you use it
also found https://libraries.io/github/matlux/jvm-breakglass , is there a browser IDE for clojure /nrepl?
Hai. I have a bit of a question, I have this nrepl server, and I like to configure which ns you ‘drop into’ when you connect to it. Ala :init-ns
in a leiningen project. Now I found https://github.com/lambdaisland/nrepl which is deprecated and suggests that you can configure this in nREPL. However, I can’t find out how 😞, can someone shine a bit of a light on that for me ^^?
Feel free to submit a ticket for nREPL to add a command-line flag for this. I never needed it, so it didn’t cross my mind, but it’s easy to do.
I’ll create an issue somewhere today ^^, thanks
Using leiningen. I wonder tho, I wanted to configure it server side because the default user
namespace has nothing, so I would say that it shouldn’t matter which client you use, you just want to drop in the ‘maintenance’ namespace so to say.
My experience with nREPL is very limited tho
the general approach is that nREPL is mainly there to enable client-tools to serve enduser requirements
I’ll try convincing lein once more
check this line in the example project? https://github.com/technomancy/leiningen/blob/145ba54eb0a5fc099380ad6feb04688a2fca9173/sample.project.clj#L373
Yeah I think I tried that, but I wasn’t too awake anymore, so I probably did something wrong ^^. Thanks for your help!
Yes, it works for lein repl
but not for lein repl :connect ...
.
Oh there is a difference between connecting to the nrepl server started by leiningen (which does apply your init-ns), and connecting to one you started manually (e.g. with nrepl.server/start-server
) which does not. That said, my applications don’t run through leiningen, so it would still be beneficial to me if either leiningen or nREPL allows ‘forcing’ an init-ns. I amended the issue with this information.
yeah, just swapping ns manually. Usually connecting with cursive so thats not too much of a hassle!
Thank you for asking, and once more, if there is something I can assist in let me know! Given the constraints of being an nREPL newbie, ofcourse 🙂
Sorry, I don’t quite understand. Are you saying that there is no ‘easy’ way to configure it on the nrepl server side, but that leiningen uses a custom middleware to apply its init-ns when connecting to it?
I don’t think that’s the case, actually. If I recall correctly it was just setting *ns*
manually.
Well, I guess we really have to make this easier to set in nREPL directly - e.g. we can pass some optional initial ns to the server when starting or something along those lines.
I’ll start a discussion on that in a GitHub issue then ^^
also for traceability if it ends up being something that is not desirable for some reason
Lets continue these two threads here: https://github.com/nrepl/nrepl/issues/186 ^^