Fork me on GitHub
#boot
<
2017-07-29
>
donyorm02:07:41

how can I install an artifact to the local maven repository, like with lein install?

donyorm02:07:40

Nevermind, I found out you can do it with bootlaces.

martinklepsch10:07:23

@donyorm there’s also the regular install task in boot, you don’t really need bootlaces. bootlaces provides the build-jar task which really is nothing else than (comp (pom) (jar) (install)) 🙂

odie13:07:01

has anybody used danielsz/system in unit tests before? I’m having loads of trouble getting at the system.repl/system var. It seems like the var is unbound even if I explicitly try to do so.

donyorm16:07:06

so I'm porting the luminus template to boot, and when I run the code with boot, the web-server (an immuntant server) starts and immediately stops. With lein it starts and runs until Ctrl+C is pressed. If I add an @(promise) statement to the boot code it works, but behaves weirdly when placed in a uberjar. What is this difference, and anyway to fixit?

donyorm16:07:30

You can see the code here: https://github.com/DonyorM/luminus-template. Create a lein project with lein new luminus test_app, create a boot project with lein new luminus test_app +boot (or use boot-new, either way).

richiardiandrea16:07:47

@donyorm I would use the promise only in core when compiled for prod and if immutant does not handle the shutdown itself, but boot tasks usually use wait

richiardiandrea16:07:21

Sorry in boot you would usually append wait at the end of the pipeline I mean

donyorm16:07:08

I see, let me see if that works

donyorm16:07:00

that did it, thanks. I didn't about the wait task

donyorm16:07:16

Any idea why lein and boot behave differently?

richiardiandrea17:07:36

It depends on how you launch -main (sorry did not read the code) in boot. If it is launched in a daemon thread and all the immutant threads are daemon threads the jvm will shut down

donyorm17:07:39

Hmmm, this is the snippet that launches -main:

(deftask run
  "Runs the project without building class files."
  []
  (require '<<project-ns>>.core)
  (let [m (resolve '<<project-ns>>.core/-main)]
    (with-pass-thru _
      (m))))
. I wouldn't think that is a daemon thread

juhoteperi18:07:57

Ah, one thing I forgot was to validate if the new module feature works with Boot-cljs

lwhorton20:07:07

i’m in the same boat there @donyorm .. i’ve been using boot for cljs quite easily and often, but I had to do a double-take when trying to use it for clojure. boot/with-pass-thru is great for running a -main function, but what about keeping the process “alive” and reloading / rerunning -main with watch/wait (and no reload task outside of browser world?)

lwhorton20:07:25

but https://github.com/boot-clj/boot/wiki/Repl-reloading was helpful — its a combination of clojure.tools.namespace (make a task for reloading into the repl), boot’s repl ( a repl to host your code ), boot’s watch ( rerun the pipeline on file change ), and a final task that invokes -main