dundalek / closh

Bash-like shell based on Clojure
Eclipse Public License 1.0
1.61k stars 65 forks source link

Figure out how to add deps from within a script #125

Open dundalek opened 5 years ago

dundalek commented 5 years ago

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

jeroenvandijk commented 5 years ago

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

jeroenvandijk commented 5 years ago

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

dundalek commented 4 years ago

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.

jeroenvandijk commented 4 years ago

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

dundalek commented 4 years ago

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