This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-29
Channels
- # aleph (2)
- # bangalore-clj (1)
- # beginners (9)
- # boot (18)
- # clara (3)
- # cljs-dev (21)
- # cljsjs (2)
- # clojure (137)
- # clojure-spec (2)
- # clojurescript (65)
- # clr (1)
- # copenhagen-clojurians (11)
- # core-async (20)
- # datascript (3)
- # lein-figwheel (1)
- # leiningen (4)
- # luminus (4)
- # lumo (1)
- # off-topic (38)
- # onyx (1)
- # parinfer (4)
- # pedestal (9)
- # protorepl (8)
- # re-frame (4)
- # reagent (92)
- # ring-swagger (2)
- # rum (1)
- # unrepl (40)
- # vim (16)
- # yada (1)
@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))
🙂
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.
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?
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).
And more specifically the templates for the build.boot and core file are here: https://github.com/DonyorM/luminus-template/blob/boot/resources/leiningen/new/luminus/core/build.boot and here https://github.com/DonyorM/luminus-template/blob/boot/resources/leiningen/new/luminus/core/src/core.clj, respectively.
@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
Sorry in boot you would usually append wait
at the end of the pipeline I mean
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
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 threadBoot-cljs 2.1.0 is out: https://github.com/boot-clj/boot-cljs/blob/master/CHANGES.md#210-2972017
Ah, one thing I forgot was to validate if the new module feature works with Boot-cljs
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?)
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