Fork me on GitHub

I’m trying to get add-lib working with prepl. I’m using the latest add-lib branch and clojure:


clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-beta7"} org.clojure/tools.deps.alpha {:git/url "" :sha "f6c080bd0049211021ea59e516d1785b08302515"}}}' -J-Dclojure.server.repl="{:port 5556,:accept clojure.core.server/io-prepl}" 


to get it working I have to set the dynamic class loader first:


(let [cl (.getContextClassLoader (Thread/currentThread))
      dcl (clojure.lang.DynamicClassLoader. cl)]
  (.setContextClassLoader (Thread/currentThread) dcl))


is that how it’s supposed to work or wouldn’t it be nice if prepl did this for me like repl does?


or is adding functionality like this the job of the tool using prepl?

Ben Hammond10:11:16

Hi guys I'm working on a project that extends which daisy-chains a bunch of small dep.edn files together using {:local/root "../edge.kick"} I'm trying to get my head round how this plays with alias declarations

Ben Hammond10:11:51

so I've just discovered that it doesn't aliases are only sampled at the root level

Ben Hammond10:11:01

which implies to me that I have misunderstood the intention of :local/root

Ben Hammond10:11:52

is there a description of what :local/root should, and should not be used for

Ben Hammond10:11:58

that you can point me at

Ben Hammond10:11:51

I guess I'm trying to strong-arm deps into working like an OSGI style module system

Ben Hammond10:11:10

and I'm wondering if that would be considered abusive


I’ve had similar ideas about module systems. In particular I have a nagging feeling that integrant/duct + deps.edn could be such a thing.

Ben Hammond10:11:17

yes you are probably right

Ben Hammond10:11:49

I think my confusion is this

Ben Hammond10:11:45

:local/root dependency allows you to see the internal development gubbbins of a dependency

Ben Hammond10:11:18

which creates the temptation that you can manipulate those other aliases

Ben Hammond10:11:08

but at some point you should expect to move that dependence to a fixed binary

Ben Hammond10:11:00

therefore the thought process should always be How would I use this if it was a binary artefact


The fact that :local/root behaves just like :git/url or :mvn/version with respect to aliases is a good thing