Fork me on GitHub
#boot
<
2017-11-06
>
qqq02:11:49

I know about

boot.user> (clojure.repl/doc javac)
-------------------------
boot.task.built-in/javac
([& {:keys [help options], :as *opts*}])
  Compile java sources.
  
  Keyword Args:
    :help     bool   Print this help info.
    :options  [str]  List of options passed to the java compiler.
nil
is there a template involving javac + watch where I can point it at a /java-src directory,and have it auto recompile on any chances / somehow ireload the classes so I can use them from clojure ?

sinistral04:11:49

https://github.com/ztellman/virgil might be worth a look... It's been on my todo list for ages, but I haven't actually used it myself yet.

cdimara04:11:20

What's the point of calling require inside a function like this: https://github.com/boot-clj/boot-new/blob/04823d2f1a8d38a2f112dea04bd4cfef2add2bda/src/boot/new/templates.clj#L102-L109 The author says this function is an alternative to pulling the Stencil library but won't (require '[stencil.core]) do just that?

qqq04:11:44

@cdimara: my entire knowledge of this is based on reading the comment -- I believe the trick works as follows: if you put it as a :requirein the namespace, than to even COMPILE the namespace, you have to add stencil as a PROJECT dependency and pull it in

qqq04:11:03

the way the function is currently defined -- if you don't run that particular function, you do NOT have to pull in the dependency

qqq04:11:17

you only have to add stencil as a project dependency if you want to actually call that function

seancorfield05:11:01

@cdimara As the author of Boot new, I can confirm @qqq's answer: a (require ...) function call is dynamic: it tries to load the namespace at runtime, so the dependency is not required by all users of the library, only those who choose to call render-text.

minikomi05:11:27

Is there a template for writing a new task?

seancorfield05:11:37

It also means that Stencil isn't automatically dragged into every project just by using Boot new.

seancorfield05:11:43

@minikomi Yes.

seancorfield05:11:46

(It's right there in the README for Boot new -- in the Getting Started paragraph, it lists the built-in templates available)

minikomi05:11:21

Thanks, I'll give it a try.

minikomi05:11:48

I have some tasks I use on most projects which I'd like to get up on clojars, even just for myself 🙂

seancorfield05:11:49

Let me know if you encounter problems. It hasn't been widely tested -- most folks create app or default projects.

qqq05:11:02

Anyone have a sample clojure + java mixed boot project I can borrow build.boot from ? I'm trying to figure out how to configure the *.java files.

borkdude09:11:25

@qqq We have src/clj and src/java both added to the :resource-paths in set-env! (not sure why we chose for resource-paths instead of source-paths)

borkdude09:11:07

@qqq and our build task looks like this: (deftask build [] (comp (javac) (aot) (pom) (jar)))

poernahi11:11:46

hello, does anyone know how to use cljs preloads in boot? I'm trying to add re-frisk in my dev task.

poernahi16:11:18

@dominicm thanks!