Fork me on GitHub
#tools-deps
<
2020-06-13
>
sveri05:06:32

Hi, Is there a way to make sure I download needed dependencies for a givem library? Like: clojure -Sdeps '{:deps {seancorfield/depstar {:mvn/version "1.0.94"}}}' but without opening a repl?

seancorfield06:06:28

@sveri Add -e nil to the end of that command.

seancorfield06:06:02

It will perform all the downloads etc and then evaluate nil (and not print it because it only prints non-`nil` values)

seancorfield06:06:05

-Stree and -Spath will also circumvent a REPL and will show you the dependency tree or class path respectively, if you want some confirmation of the resources being accessed.

sveri06:06:38

Thank you, exactly what I am looking for. I don't need the extra output for now.

sveri08:06:30

@seancorfield I hope it's fine if I ask you directly here. I have been using depstar successfully so far and am experimenting with graalvm right now. It seems like native-image analyzes faster if direct linking is enabled. Is there a way to pass the -Dclojure.compiler.direct-linking=true` option while creating an uberjar with depstar?

sveri08:06:08

Ah, I think I got it. deps.edn supports :jvm-opts ["-Dclojure.compiler.direct-linking=true"] for aliases, if I read that right.

seancorfield18:06:08

@sveri Or you can pass it on the command-line as -J-Dclojure.compiler.direct-linking=true

sveri19:06:39

@seancorfield Does that -J-D... work for clj calls too? In only saw it in reference to the native-image tool

seancorfield19:06:53

Yes, -J is a clojure/`clj` option to pass JVM options.

sveri20:06:19

Okay, great, thank you.