@seancorfield What exactly prevents boot from being run as a library?
It seems like something like clj -m boot.main
@phreed see the exception above?
@seancorfield Yes, I saw that but I did not understand what was going wrong.
The Boot JAR depends on boot.App
-- which is the launcher app part of Boot that is not part of the library, because Boot is designed to be launched via boot.App
, not from anything else.
(! 1200)-> clj -Sdeps '{:deps {boot/core {:mvn/version "RELEASE"}}}'
Downloading: boot/core/maven-metadata.xml from <https://repo.clojars.org/>
Clojure 1.9.0
user=> (require 'boot.core)
ClassNotFoundException boot.App java.net.URLClassLoader$1.run (URLClassLoader.java:372)
user=>
Several Boot namespaces have (:import [boot App])
or just refer directly to boot.App/config
assuming it'll be on the classloader because that's how Boot runs, so you can't load those namespaces into a Clojure context that has been started from outside Boot (because boot.App
isn't loaded).
Does that help @phreed?
I think I understand. I thought boot -b > src/boot/user.clj
produced a file that with a little work could be evaluated via clj -m boot/user.clj
but I guess that is not right.
I suppose it could be made to work if provided with a properly constructed mock boot.App
?
Sounds like an unrealistic expectation to me...