Fork me on GitHub
#boot
<
2016-04-28
>
richiardiandrea01:04:30

A question, are now cljx files completely excluded from boot-cljs? I am trying to add timbre but it looks like it is not add timbre.cljx on the classpath

lwhorton03:04:52

hmm.. there is a dosh command for running shell scripts, but i’m having a hard time getting boot to write to the proper dir as a result of the sh; is there a good example of this somewhere?

escherize04:04:38

Hey guys, is there anything I can do about this error? https://github.com/zcaudate/one.love/issues/3

escherize04:04:31

tldr: library from clojars loads fine using lein, throws an error when trying to load via boot.

yenda12:04:18

I get a null point exception in my code when I do boot run which I don't get when I call the -main function in the repl

alandipert13:04:12

@yenda: got the stack trace? sounds odd

domkm16:04:10

Is there a way with boot-cljs to generate a source map but not include //# sourceMappingUrl=... in the source file?

juhoteperi16:04:44

@domkm: Source maps are handled by ClojureScript and I don't think there is such option

jupl18:04:08

I've been messing around with cljs and boot. When I use boot-cljs to generate JS I would like to create a task to create a production build without the ___.out directories. I spent days trying to find out how to do this. Any recommendations?

juhoteperi18:04:38

@jupl: You can remove the out directory using sift task (`boot sift --help`)

jupl18:04:13

Will take a look. Thanks!

richiardiandrea18:04:32

@jupl: I do it all the time -> (sift :include #{#".*.out"} :invert true)

lwhorton20:04:15

along those same lines, is there a way to filter down the matching fileset? for example, if I want “all files ending in .css, except those in ‘/dir’”? getting the css is simple (c/by-ext [“.css”]) but i’m not sure if I should be filtering them “raw” via filterv, or if there is a better (more reliable) way? (or is this what sift is for?)

alandipert20:04:58

@lwhorton: the idea with sift is to make many common movements/renames in the fileset easy to do without creating a task, but yes the idea is if you need to do more sophisticated stuff you do it in code

alandipert20:04:08

using the fileset API in a task of your own design

lwhorton20:04:34

i couldn’t figure out how to use the by/re or by/path to get the above-mentioned case

lwhorton20:04:44

but thanks for the clarification with sift

richiardiandrea21:04:45

Sooo can now pods see Clojure data structures? I mean with with-pod macro. I am trying to call aot and jar in a pod

richiardiandrea21:04:49

And on general to include only the deps I want in my final uberjas (without all the boot plugins for instance)

lwhorton21:04:30

am I missing something obvious here? I’ve looked over 3-4 example tasks for how to ‘cache’ the result to only run tasks over changed files, but for some reason my task is running over all the files even though 1 changed:

(let [tmp (c/tmp-dir!)
          prev (atom nil)]
        (c/with-pre-wrap fileset
            (let [diff (c/fileset-diff @prev fileset)
                  in-files (c/input-files diff)
                  styl-files (c/by-ext [".styl"] in-files)]
                (reset! prev styl-files)
                (when (seq styl-files)
                    (u/info "Detecting %d changed .styl files.\n" (count styl-files))
                    (doseq [in styl-files]
                        … do the xformation))
                (-> fileset
                    (c/add-resource tmp)
                    c/commit!)
            )
        )))

lwhorton21:04:03

it’s the same simple pattern everywhere - outside the block declare an atom, get a diff with fileset-diff between atom and new fileset, filter out files, update atom, run task over thinned fileset

lwhorton21:04:32

but for some reason that “Detecting %d changed” will always spit out the same # of files.

lwhorton21:04:28

ayup, after re-reading for the 10th time I see my mistake reset! prev styl-files -> reset! prev fileset … it’s a little counterintuitive, but I get it now.

richiardiandrea22:04:29

A question: I set one dependency only with set-env! at the beginning of the file...is there a way to tell uber not to pack it?

jupl23:04:27

@richiardiandrea: I think you set the :scope to "test"

richiardiandrea23:04:06

@jupl thanks, I tried :exclude-scope but test is already excluded