I learned about tools-deps-native which is awesome (installs libs+deps and provides classpath info).
I can get this info with that:
$ tools-deps-native deps '{:deps {medley/medley {:mvn/version "1.3.0"}}}' | ys -e 'IN:slurp:read-string.classpath-roots:yaml/dump:say'
Downloading: medley/medley/1.3.0/medley-1.3.0.pom from clojars
Downloading: medley/medley/1.3.0/medley-1.3.0.jar from clojars
- /home/ingy/.m2/repository/medley/medley/1.3.0/medley-1.3.0.jar
- /home/ingy/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar
- /home/ingy/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar
- /home/ingy/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar
Looking at bb and sci, it seems that all deps stuff is done on the bb side, with no helpers on the sci side.
If I wanted to accomplish something like (from the bb book) in sci (without bb):
; (require '[babashka.deps :as deps]) ;; (not available to use as a library)
(deps/add-deps '{:deps {medley/medley {:mvn/version "1.3.0"}}})
(require '[medley.core :as m])
(m/index-by :id [{:id 1} {:id 2}])
What would I need to do?
I'm thinking I could load all the clojure files from the jars, and use add-namespace! to add it to my ctx, but that's just a guess.
But thought it best to ask here, before I get too deep into the wrong rabbit holes.it's best to just look at how bb does this. the SCI interaction point is :load-fn
Given this apparent resolution https://github.com/oracle/graal/issues/1956#issuecomment-1775455077 is this java still needed? https://github.com/babashka/babashka/blob/master/impl-java/src-java/babashka/impl/URLClassLoader.java