Fork me on GitHub
#tools-deps
<
2018-11-12
>
gfredericks00:11:24

there's no way to add a jvm-opt without having to enable an alias via CLI opts, is that right?

gfredericks01:11:38

@mfikes sorry, I mean I'd like to put it in the deps.edn

mfikes01:11:41

Example: clj -J-Xmx512m

gfredericks01:11:44

and have, e.g., clojure pick it up

gfredericks01:11:50

without any extra args

mfikes01:11:37

Ahh, I think you are right in that case. I can't think of a way to just "make it so"

mfikes01:11:37

It would seem, a top-level thing, sibling of :deps or :paths is where a :jvm-opts could live

gfredericks01:11:04

yeah; I can't tell if that is just a missing feature, or if there's some philosophical conflict

Alex Miller (Clojure team)01:11:58

It’s missing, no philosophical objection

4
adamfrey19:11:14

here's a command that I can run from the terminal to start a cider-ready nrepl, but I'm having a problem when putting it into an aliase in a deps.edn file.

clj -Sdeps '{:deps {nrepl {:mvn/version "0.4.5"} cider/cider-nrepl {:mvn/version "0.18.0"} refactor-nrepl {:mvn/version "2.4.0"}}}' -m nrepl.cmdline --middleware '[cider.nrepl/cider-middleware refactor-nrepl.middleware/wrap-refactor]'                                                 
the --middleware option is a vector with a space in the middle, but I can't find any way to make it work from deps.edn.
:main-opts  ["-m" "nrepl.cmdline"
                       "--middleware" "[cider.nrepl/cider-middleware refactor-nrepl.middleware/wrap-refactor]"
                       "--interactive"]
by the time it gets to the -main function the args binding is set to
("--middleware" "[cider.nrepl/cider-middleware" "refactor-nrepl.middleware/wrap-refactor]" "--interactive")

dottedmag19:11:08

@adamfrey try , instead of a space

adamfrey19:11:40

oh good call! it works because it gets passed as one thing to the nrepl main and then nrepl parses it from a string using edn/read-string Thanks!

martinklepsch21:11:42

Also known as the Corfield Comma 😂

adamfrey19:11:40

oh good call! it works because it gets passed as one thing to the nrepl main and then nrepl parses it from a string using edn/read-string Thanks!

avi19:11:21

I seem to be bumping up against a dep conflict but I’m not quite understanding the behavior I’m seeing from tools.deps + CLI-tools; since I had a lot of text to share I started a topic over at ClojureVerse. If anyone has a minute to take a quick look and possibly enlighten me as to what I’m missing, I’d much appreciate it! https://clojureverse.org/t/tools-deps-not-downloading-all-deps-when-run-with-r-aliases/3146?u=avi

seancorfield20:11:28

Answered on ClojureVerse.

avi20:11:56

Thanks Sean! 🙏

seancorfield20:11:05

TL:DR; dependency version resolution has a different set of versions to consider with one alias vs multiple aliases.

avi20:11:05

I think I get it; makes sense 😅