Closed ulsa closed 10 years ago
Odd! I was not able to reproduce. The build.boot
I tested with is below. Could you please post your full build.boot
and platform?
#!/usr/bin/env boot
#tailrecursion.boot.core/version "2.5.0"
(set-env!
:project 'someapp
:version "0.1.0-SNAPSHOT"
:dependencies '[[tailrecursion/boot.task "2.2.1"]
[tailrecursion/hoplon "5.10.8"]
[org.clojure/clojurescript "0.0-2202"]
[tailrecursion/boot.ring "0.2.1"]
[com.datomic/datomic-free "0.9.4815.12"]
[datascript "0.1.6"]
[org.clojure/algo.generic "0.1.2"]
[lein-light-nrepl "0.0.18"]
[org.clojure/tools.nrepl "0.2.3"]]
:out-path "resources/public"
:src-paths #{"src"})
(add-sync! (get-env :out-path) #{"assets"})
(require '[tailrecursion.hoplon.boot :refer :all])
(deftask development
[]
(comp (watch) (hoplon {:prerender false :pretty-print true})))
Created new hoplon-castra project, then manually added changes according to Daniel Neal's video.
MacOSX 10.9.3.
$ lein version
Leiningen 2.4.1 on Java 1.8.0_20-ea Java HotSpot(TM) 64-Bit Server VM
#!/usr/bin/env boot
#tailrecursion.boot.core/version "2.5.0"
(set-env!
:project 'testing-hoplon-castra
:version "0.1.0-SNAPSHOT"
:dependencies '[[tailrecursion/boot.task "2.2.1"]
[tailrecursion/hoplon "5.10.8"]
[org.clojure/clojurescript "0.0-2234"]
[tailrecursion/boot.ring "0.2.1"]
[com.datomic/datomic-free "0.9.4815.12"]
[datascript "0.1.6"]
[org.clojure/algo.generic "0.1.2"]
[lein-light-nrepl "0.0.18"]
[org.clojure/tools.nrepl "0.2.3"]]
:out-path "resources/public"
:src-paths #{"src/hl" "src/cljs" "src/clj"})
;; Static resources (css, images, etc.):
(add-sync! (get-env :out-path) #{"assets"})
(require '[tailrecursion.hoplon.boot :refer :all]
'[tailrecursion.castra.task :as c]
'[lighttable.nrepl.handler :as light]
'[clojure.tools.nrepl.server :as nrepl])
(deftask repl-light
"Launch nrepl in the project"
[]
(let [nrepl-server (atom nil)]
(fn [continue]
(fn [event]
(swap! nrepl-server
#(or % (nrepl/start-server
:port 0
:handler (nrepl/default-handler #'light/lighttable-ops))))
(println "nrepl running on" (:port @nrepl-server))
(continue event)
@(promise event)))))
(deftask development
"Build testing-hoplon-castra for development."
[]
(comp (repl-light) (watch) (hoplon {:prerender false}) (c/castra-dev-server 'testing-hoplon-castra.api)))
(deftask production
"Build testing-hoplon-castra for production."
[]
(hoplon {:optimizations :advanced}))
I added datomic as a dependency.
I got the same error, org.apache.commons.codec.binary.Base32, when using [tailrecursion/hoplon "5.10.11"] but it runs ok with [tailrecursion/hoplon "5.10.7"]
I transplanted the :dependencies
into a project.clj
and ran lein deps :tree
to see what was going on.
I discovered that datomic-free
was bringing in a version of commons-codec
(the library org.apache.commons.codec.binary.Base32
is in) that conflicts with what castra
depends on via crypto-random
:
([com.datomic/datomic-free "0.9.4815.12"] -> [com.amazonaws/aws-java-sdk "1.6.6" :exclusions [javax.mail/mail org.apache.httpcomponents/httpclient commons-logging]] -> [commons-codec "1.3"])
( overrides)
([tailrecursion/hoplon "5.10.8"] -> [tailrecursion/castra "2.1.0"] -> [crypto-random "1.2.0"] -> [commons-codec "1.6"])
We have tentative plans to move boot
to a system using multiple JVMs that could help circumvent these kind of Maven/classloader nightmares. In the meantime though, as with lein
, we are subject to them.
One fix is to bring in Datomic like this:
[com.datomic/datomic-free "0.9.4815.12" :exclusions [commons-codec]]
Work-around OK. Thanks.
If I have datomic-free (any version, it seems) as a dependency, I get this output when I run boot:
If I remove the datomic dependency, like so:
then it works fine: