closh icon indicating copy to clipboard operation
closh copied to clipboard

Figure out how to add deps from within a script

Open dundalek opened this issue 5 years ago • 5 comments

To support git deps. I think it might be possible to call resolve-deps and make-classpatch from tools.deps programatically. Then add the result to classpath with pomegranate's add-classpath.

https://clojure.org/reference/deps_and_cli#_resolve_deps https://clojure.org/reference/deps_and_cli#_make_classpath

https://github.com/lambdaisland/kaocha/blob/master/src/kaocha/classpath.clj

dundalek avatar Apr 09 '19 19:04 dundalek

Some previous work/thought: https://github.com/cemerick/pomegranate/issues/106

jeroenvandijk avatar Apr 10 '19 13:04 jeroenvandijk

A collegeau pointed me to a similar thing with tools.deps in IClojure (Clojure in Jupyter) https://github.com/HCADatalab/IClojure/blob/62cda58dee9c57d7d5e120df618e9ffbcd6181d9/src/iclj/core.clj#L368

jeroenvandijk avatar Apr 12 '19 08:04 jeroenvandijk

It seems like add-lib function that would handle this is on the roadmap for Clojure 1.11. I think I will wait for that instead of trying to create some custom solution.

dundalek avatar Oct 08 '19 21:10 dundalek

With Sci and GraalVM things have becomes slightly more difficult. However, there is this idea from @borkdude to explore the library feature of GraalVM to host native extensions on Clojars :)

See https://github.com/lread/clj-graal-docs/issues/15

jeroenvandijk avatar Nov 19 '19 11:11 jeroenvandijk

@jeroenvandijk That would be cool, I am definitely interested how the exploration will turn out.

dundalek avatar Nov 19 '19 20:11 dundalek