Fork me on GitHub
#boot
<
2015-11-20
>
sekao06:11:25

are there any templates to start a project with boot? i saw one for cljs but not for clojure jvm.

alqvist08:11:07

@martinklepsch , @upgradingdave : thanks for the tips, will check it out

jaen16:11:38

Sorry if it's an obvious place somewhere, but is there a boot counterpart to this - https://github.com/sunng87/lein-bootclasspath-deps?

micha16:11:11

@jaen: boot only uses a single jvm, so it can't alter the bootclasspath

micha16:11:49

you can use BOOT_JVM_OPTIONS to accomplish this

micha16:11:36

BOOT_JVM_OPTIONS="${BOOT_JVM_OPTIONS} -Xbootclasspath...

jaen16:11:39

There's no way to have that tucked somewhere like boot.properties so I don't have to remember about that each time, right?

micha17:11:50

boot.properties is read by things running in the jvm

micha17:11:24

we might modify the loader script maybe

micha17:11:53

i dunno, that would complicate things

micha17:11:07

you can make a wrapper script of your own that sets that up

micha17:11:15

i think that's the best way

micha17:11:26

and you can commit that in your project repo

jaen17:11:01

Yeah, that's probably what I'll do then.

sekao21:11:22

i’m trying to AOT compile a namespace so my gen-class will work. i’m getting a ClassNotFoundException. my task looks like this:

sekao21:11:42

(deftask run [] (comp (with-pre-wrap fileset (app/-main) fileset) (aot)))

micha21:11:18

@sekao: that would do the AOT after running app/-main

sekao21:11:41

are you sure? I thought comp works backwards

sekao21:11:56

@micha: judging by the documentation, comp works right-to-left

micha21:11:47

yes, comp does

micha21:11:53

but consider:

micha21:11:02

(def f  
  (comp
    (fn [next]
      (fn [x]
        (println "one")
        (next x)))
    (fn [next]
      (fn [x]
        (println "two")
        (next x)))))

micha21:11:14

((f identity) 100)

micha21:11:02

ok there we go

micha21:11:08

that's what you're really doing there

micha21:11:42

so while comp works right to left, the middleware work outer to inner

micha21:11:57

that's what the pre-wrap means

sekao21:11:35

but i still get the same exception when i switch the order. am i missing a step?

micha21:11:52

you need to tell the aot task which namespace to compile

micha21:11:07

(aot :namespace #{'foo.bar})

micha21:11:36

or (aot :all true)

sekao21:11:02

yep I’m doing that via task-options! before i defined my task

sekao21:11:33

i have (task-options! aot {:namespace '#{net.sekao.nightcode.core}})

micha21:11:36

yeah that should work

micha21:11:01

can you paste your whole file?

micha22:11:02

i wonder if the problem is that you're requiring the namespace before compiling it

micha22:11:26

perhaps require/refer inside the with-pre-wrap expression

sekao22:11:24

am i able to just move it into the with-pre-wrap expression?

micha22:11:32

you need to use refer then, like this

micha22:11:08

(with-pre-wrap [fs]
  (require 'the.namespace)
  ((resolve 'the.namespace/-main) arg1 arg2)
  ...

alandipert22:11:32

@micha: you mean resolve, right?

micha22:11:30

sorry, yes resolve

alandipert22:11:48

@raywillig: re: lambda, actually our lambda functions are scala... because they do stuff we had scala code already to do

alandipert22:11:11

but i hope to port them to kotlin so as not to pay for clj startup time

sekao22:11:34

@micha: thanks very much for your help

micha22:11:33

@sekao: success?

sekao22:11:46

yep. it gets an IllegalAccessError after the main function runs, most likely because JavaFX doesn’t like being run by boot. when i build a jar file and run it separately it works, so that’s just something i’ll have to figure out.

micha23:11:58

weird, the error