This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-24
Channels
- # announcements (13)
- # asami (9)
- # aws (3)
- # babashka (13)
- # babashka-sci-dev (7)
- # beginners (32)
- # calva (59)
- # cider (9)
- # clj-kondo (5)
- # cljsrn (14)
- # clojure (98)
- # clojure-brasil (5)
- # clojure-dev (1)
- # clojure-europe (30)
- # clojure-france (12)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (7)
- # clojurescript (20)
- # conjure (2)
- # datahike (7)
- # datalog (38)
- # datomic (29)
- # events (1)
- # fulcro (72)
- # graalvm (1)
- # gratitude (3)
- # helix (7)
- # honeysql (3)
- # improve-getting-started (2)
- # introduce-yourself (1)
- # leiningen (13)
- # lsp (17)
- # malli (11)
- # meander (8)
- # nextjournal (3)
- # off-topic (5)
- # pathom (2)
- # portal (43)
- # rdf (2)
- # re-frame (8)
- # reagent (7)
- # reitit (1)
- # shadow-cljs (27)
- # spacemacs (31)
- # sql (2)
- # tools-deps (3)
- # vim (1)
- # xtdb (12)
Hi folks. I have some :jvm-ops
in my profile. However, I’d like to use lein
update-in
for replacing them when invoking a specific command.
What’s the correct syntax for that?
Normally, I’d use lein update-in :jvm-opts conj <stuff>
. But I don’t want to conj
, I’d like to completely replace the current jvm-opts
value.
Actually, seems that it’s not working :thinking_face: Context: I have this in my lein profile:
{:repl {:jvm-opts ["-Dclojure.server.repl={:port,5555,:accept,clojure.core.server/repl}"]}}
This is the port I use for socket repl.
Now, I’m trying to run another project in port 0 (that is, random):
lein update-in : assoc :jvm-options "-Dclojure.server.repl={:port,0,:accept,clojure.core.server/repl}" -- repl
However, I’m getting
Exception in thread "main" java.net.BindException: Address already in use
Which makes me think that it did not work :thinking_face:Got it. Thanks for the explanation. I think I will change my approach then – I’ll remove jvm-opts
from my profile and use it by demand.
So, I must be messing something really basic, because this isn’t working:
lein update-in :jvm-opts conj "-Dclojure.server.repl={:port,5555,:accept,clojure.core.server/repl}" -- repl
gets this error
array element type mismatch
with my lein profile having
:jvm-opts []
inside :repl
For completeness, in
lein update-in : assoc :jvm-options "-Dclojure.server.repl={:port,0,:accept,clojure.core.server/repl}" -- repl
you assoced a single string, whereas jvm-options is expected to be a vectorbtw update-in is kind of a hack, there are things that certainly don't work with it. It's more idiomatic to use profiles