This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-11
Channels
- # admin-announcements (20)
- # beginners (48)
- # boot (90)
- # cider (33)
- # cljs-dev (5)
- # cljsjs (10)
- # cljsrn (7)
- # clojure (68)
- # clojure-austin (5)
- # clojure-bangladesh (4)
- # clojure-finland (10)
- # clojure-gamedev (1)
- # clojure-madison (7)
- # clojure-poland (15)
- # clojure-russia (75)
- # clojurescript (25)
- # core-async (23)
- # cursive (5)
- # data-science (43)
- # datomic (15)
- # dirac (26)
- # editors (10)
- # emacs (2)
- # euroclojure (12)
- # funcool (23)
- # hoplon (7)
- # immutant (68)
- # jobs (24)
- # jobs-discuss (1)
- # juxt (1)
- # keechma (9)
- # ldnclj (7)
- # luminus (66)
- # off-topic (54)
- # om (170)
- # proton (7)
- # re-frame (1)
- # reagent (15)
- # ring-swagger (11)
- # spacemacs (6)
- # testing (1)
- # vim (1)
- # yada (19)
Assuming I’ve required/refered with-prewrap, does this look like a valid way to start an auxiliary server via a boot task, without effecting the build in any other way?
(defn start-dirac! []
(require 'dirac.agent)
(let [dirac-boot! (resolve 'dirac.agent/boot!)]
(dirac-boot!)))
(deftask dirac
"run dirac agent"
[]
(with-pre-wrap fileset
(start-dirac!)
fileset))
(deftask dirac
"run dirac agent"
[]
(let [dirac (delay (start-dirac!))]
(with-pass-thru _ @dirac)))
and you don't need to worry about having multiple dirac servers trying to use the same ports or whatever
also there is the cleanup
macro you can use to stop the server when the pipeline finishes
(deftask dirac
"run dirac agent"
[]
(let [dirac (delay (start-dirac!))]
(cleanup (.stop @dirac))
(with-pass-thru _ @dirac)))
That's cool
@smw how do I try it? Do you have a branch?
@richiardiandrea: Not yet, but I’ll try to later today. Few bugs
Thanks very much. I was thinking I was going to have to inject a file into the fileset and test that for idempotency
Is there an example of multiple builds with boot-cljs
?
I have several src/cljs/js/myfile.cljs.edn
, each setting an :asset-path
which works fine but in the end none of them have goog
defined (it is compiled alone in out
) while the others are in target
Maybe I should try https://github.com/clojure/clojurescript/wiki/Compiler-Options#modules
usually you can just put the .cljs.edn file where you want it and everything will be taken care of for you
Ok - the thing is I was sharing some code when I had two edn
files. One was importing the other. I think I did that because there can be only one instance of the google closure library (?)
i would try a simple example to start with, just multiple .cljs.edn files without any :compiler-options
or anything like that
once you start specifying compiler options directly there are many things that will go wrong
Yes I realised that (in fact that went very wrong and my lein file quickly became huge at the time)
boot-cljs has some hard-won code in there that knows how to set the compiler options in all the different cases
https://github.com/hashrocket/boot_devcards_example/blob/master/src/cljs/devcards.cljs.edn
It is from there : https://github.com/bhauman/devcards#usage-without-figwheel
what a scheme
Regarding my question earlier : I am building a SaaS service. Distributed via a js (well cljs) script. So I need to be able to build the script separately. I also need to demo/test it in a frontend site and in devcards (hence my 4 edn
builds).
every now and then i come across boot dependencies with :scope “test"
qualifiers. what does this mean exactly? is this documented anywhere?
that's a transitive dependency because anyone who uses your library will need to pull in clj-time too, right?
so you specify that in your pom, so maven will automatically fetch clj-time transitively when your library is a dependency
ok so what about dependencies that are only needed when building or testing your library?
you want to have something in the pom about those dependencies so that people can build or test your library from source
but you don't want people who use your library as a jar to have to pull those dependencies in transitively, right?
ah ok - i’m familiar with the maven scopes, i just wasn’t sure if they were the same for boot. does boot use maven dependency stuff under the covers?