Thank you so much for trying to help @alexmiller. Is there some place you'd recommend to read up on ClassLoaders and this JVM background? I'm a bit embarassed I can't diagnose this on my own
I've modified `add-test-lib.clj` to work with the latest version of `add-lib` (now `add-libs`) and to set the `DynamicClassLoader` as per the example you linked
(->>(Thread/currentThread)
(.getContextClassLoader)
(clojure.lang.DynamicClassLoader.)
(.setContextClassLoader (Thread/currentThread)))
(use 'clojure.tools.deps.alpha.repl)
(add-libs {'thi.ng/geom {:mvn/version "1.0.0-RC4"}})
(require `thi.ng.geom.svg.core)
(thi.ng.geom.svg.core/circle [0 1] 6)
And now I run with the latest version
clj -Sdeps '{:deps {org.clojure/tools.deps.alpha {:git/url "
https://github.com/clojure/tools.deps.alpha.git" :sha "241cd24c35ba770aea4773ea161d45276e5d3a73"}}}' add-lib-test.clj
Again, it works in the REPL but not through a file. However it does get a bit further now :) I'm guessing the ClassLoader is still have issues, or there is something wrong with the non-REPL classpath (another term I'm a bit hazy on).
{:clojure.main/message
"Syntax error (FileNotFoundException) compiling at (add-lib-test.clj:4:1).\nCould not locate thi/ng/geom/svg/core__init.class, thi/ng/geom/svg/core.clj or thi/ng/geom/svg/core.cljc on classpath.\n",
:clojure.main/triage
{:clojure.error/phase :compile-syntax-check,
:clojure.error/line 4,
:clojure.error/column 1,
:clojure.error/source "add-lib-test.clj",
:clojure.error/path "add-lib-test.clj",
:clojure.error/class java.io.FileNotFoundException,
:clojure.error/cause
"Could not locate thi/ng/geom/svg/core__init.class, thi/ng/geom/svg/core.clj or thi/ng/geom/svg/core.cljc on classpath."},
:clojure.main/trace
{:via
[{:type clojure.lang.Compiler$CompilerException,
:message
"Syntax error compiling at (/home/geokon/add-lib-test.clj:4:1).",
:data
{:clojure.error/phase :compile-syntax-check,
:clojure.error/line 4,
:clojure.error/column 1,
:clojure.error/source "/home/geokon/add-lib-test.clj"},
:at [clojure.lang.Compiler load "Compiler.java" 7648]}
{:type java.io.FileNotFoundException,
:message
"Could not locate thi/ng/geom/svg/core__init.class, thi/ng/geom/svg/core.clj or thi/ng/geom/svg/core.cljc on classpath.",
:at [clojure.lang.RT load "RT.java" 462]}],
:trace
[[clojure.lang.RT load "RT.java" 462]
[clojure.lang.RT load "RT.java" 424]
[clojure.core$load$fn__6839 invoke "core.clj" 6126]
[clojure.core$load invokeStatic "core.clj" 6125]
[clojure.core$load doInvoke "core.clj" 6109]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[clojure.core$load_one invokeStatic "core.clj" 5908]
[clojure.core$load_one invoke "core.clj" 5903]
[clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
[clojure.core$load_lib invokeStatic "core.clj" 5947]
[clojure.core$load_lib doInvoke "core.clj" 5928]
[clojure.lang.RestFn applyTo "RestFn.java" 142]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$load_libs invokeStatic "core.clj" 5985]
[clojure.core$load_libs doInvoke "core.clj" 5969]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$require invokeStatic "core.clj" 6007]
[clojure.core$require doInvoke "core.clj" 6007]
[clojure.lang.RestFn invoke "RestFn.java" 408]
[user$eval4834 invokeStatic "add-lib-test.clj" 4]
[user$eval4834 invoke "add-lib-test.clj" 4]
[clojure.lang.Compiler eval "Compiler.java" 7177]
[clojure.lang.Compiler load "Compiler.java" 7636]
[clojure.lang.Compiler loadFile "Compiler.java" 7574]
[clojure.main$load_script invokeStatic "main.clj" 475]
[clojure.main$script_opt invokeStatic "main.clj" 535]
[clojure.main$script_opt invoke "main.clj" 530]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause
"Could not locate thi/ng/geom/svg/core__init.class, thi/ng/geom/svg/core.clj or thi/ng/geom/svg/core.cljc on classpath.",
:phase :compile-syntax-check}}