boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
phreed 2018-04-23T22:49:06.000289Z

@seancorfield What exactly prevents boot from being run as a library? It seems like something like clj -m boot.main

seancorfield 2018-04-23T22:54:47.000324Z

@phreed see the exception above?

phreed 2018-04-23T22:59:43.000394Z

@seancorfield Yes, I saw that but I did not understand what was going wrong.

seancorfield 2018-04-23T23:07:49.000338Z

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=&gt; (require 'boot.core)
ClassNotFoundException boot.App  java.net.URLClassLoader$1.run (URLClassLoader.java:372)
user=&gt; 

seancorfield 2018-04-23T23:12:37.000396Z

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).

seancorfield 2018-04-23T23:12:47.000232Z

Does that help @phreed?

phreed 2018-04-23T23:17:10.000019Z

I think I understand. I thought boot -b &gt; 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?

seancorfield 2018-04-23T23:55:52.000241Z

Sounds like an unrealistic expectation to me...