Fork me on GitHub
#hoplon
<
2017-02-10
>
kiemdoder12:02:20

I started a new hoplon project with "boot -d boot/new new -t hoplon-castra -n hoplon-test" but when I run "boot dev" in the newly created project directory I get an clojure.lang.ExceptionInfo exception. Where can I report this problem?

kleewho12:02:19

I've reported my problems here, but there's no response till now, so maybe it's not the right place https://github.com/tailrecursion/hoplon-castra-template

kiemdoder12:02:14

thanks kleewho - that looks like a sensible place to report the problem

dm312:02:32

you need at least Clojure 1.8.0 I think

dm312:02:50

add a boot.properties file to the root of the project (or modify the one in ~/.boot/)

kiemdoder12:02:50

I see someone logged the problem already

kiemdoder12:02:56

when I change to Clojure 1.8.0 I still get an exception but a different one this time: java.io.FileNotFoundException: Could not locate clojure/tools/nrepl/server__init.class

dm312:02:11

try adding this dep: [org.clojure/tools.nrepl “0.2.12”]

kleewho12:02:09

eventually I was able to run the project

kleewho12:02:40

(set-env! :dependencies '[[adzerk/boot-cljs "1.7.228-1"] [adzerk/boot-reload "0.5.0"] [adzerk/boot-cljs-repl "0.3.3"] [org.clojure/tools.nrepl "0.2.12" :scope "test"] [compojure "1.6.0-beta3"] [hoplon/castra "3.0.0-alpha7"] [hoplon/hoplon "6.0.0-alpha17"] [org.clojure/clojure "1.9.0-alpha10"] [org.clojure/clojurescript "1.9.93"] [pandeiro/boot-http "0.7.6"] [ring "1.5.0"] [ring/ring-defaults "0.2.1"]]

kleewho12:02:52

here is the list of dependencies that worked for me

kiemdoder12:02:10

Yes @kleewho I ran into the same problem you did. Thanks for the list of deps

kiemdoder12:02:11

"boot dev" is working fine now 🙂

kiemdoder13:02:34

@kleewho I see the the clojure source is part of the :resource-paths. Do you know what task is responsible for compiling the clojure code?

kleewho13:02:46

well, I don't and actually I have some weird problems with compiling clojure code... I need to start boot dev several time before my app is working fine

dm313:02:49

tasks aren’t compiling the code

dm313:02:15

it’s compiled on the fly when you load it the first time

dm313:02:18

I guess in that project it’s initialized by requiring the Ring handler running inside the web server started by the boot-http task

dm313:02:50

or you can do it from the repl

dm313:02:01

or from whatever editor integration you are running

kiemdoder13:02:39

You are right @dm3 it looks like Ring is responsible for clojure source compilation. I never knew that Ring can do that. It also recompiles the code when it changes and reload is enabled.

dm313:02:52

the ring handler (which is just a normal clojure function) just triggers code reloading

dm313:02:21

using require

alandipert14:02:57

i shared recently how i do code reload in dev w/ ring and boot, https://github.com/boot-clj/boot-war-example

alandipert14:02:12

a small amount of shenanigans are involved because of the way boot manages source files https://github.com/boot-clj/boot-war-example/blob/master/src/boot_war_example/core_dev.clj

alandipert14:02:18

hm, i think today i'm gonna fix up the hoplon castra template. get the live reload stuff in there, move to hoplon org, pin the deps

kiemdoder15:02:29

Thank you for the example @alandipert. Also a big thank you to you and everyone else involved with boot/hoplon etc. for all your efforts. I discovered boot/hoplon only this week after catching up on some Cognicasts and I think I'm definitely here to stay 🙂

onetom18:02:25

no new people from Clojure Remote 2017? @flyboarder maybe we should "advertise" hoplon a bit more, no? 🙂