tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
sveri 2020-06-13T05:54:32.327Z

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?

seancorfield 2020-06-13T06:06:28.327600Z

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

seancorfield 2020-06-13T06:07:02.328300Z

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

seancorfield 2020-06-13T06:08:05.329400Z

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

sveri 2020-06-13T06:09:38.329900Z

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

sveri 2020-06-13T06:09:47.330100Z

@seancorfield

1
sveri 2020-06-13T08:20:30.331800Z

@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?

sveri 2020-06-13T08:30:08.332400Z

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

seancorfield 2020-06-13T18:30:08.333400Z

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

sveri 2020-06-13T19:05:39.334100Z

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

seancorfield 2020-06-13T19:06:53.334700Z

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

sveri 2020-06-13T20:22:19.335Z

Okay, great, thank you.