Fork me on GitHub

@seancorfield if I wanted it the other way round, so I could aot, how would I do that?


Open an issue for an option to control the mapping? But, TBH, I don't understand why you wouldn't have "src" in :resource-paths in Boot, so you'll need to explain the use case in better detail.


My understanding is that the use case is full AOT, where you don't want clj in the resulting jar


So you'd want :paths [] and :extra-paths ["src"] in deps.edn for that? Frankly, I wouldn't want to do anything to encourage AOT. It's so problematic.


What is the intention of source-paths vs resource-paths again?


source paths get processed, and don't go into target. resource paths may be processed, and do end up in target.


I'm struggling to pass data in the boot pipeline, I've tried setting atom in let binding and reset! it to be read in the next task sequence, but the atom isn't mutated when its dereferenced, and also do a let binding

(deftask x []
     (with-pass-thru _ 
        (let [data-i-need (fn)]
           (comp (task2 data-i-need)
                (task3 data-i-need)))
but it just wont run task2 and task3 in this example. The binding _ in with-pass-thru, is only fileset, I guess it's not possible to pass it just clojure data to be read be subsequent tasks?


so what I'd love to be able to do would be something like this

(deftask a []
  (with-pass-thru x
    (assoc x :data "wow")))

(deftask b []
  (comp (a)
        (with-pass-thru x
          (prn (get x :data)))))
boot b and print "wow"


that's an intriguing idea -- i wonder if there is some place in the fileset where we can hang arbitrary data


What we do is add things to the Boot environment: (set-env! :worldsingles/some-symbol some-value) in one place and (get-env! :worldsingles/some-symbol) in another. Using namespace'd keywords to avoid conflicts /cc @U0CAUAKCG


(vary-meta fileset #(assoc % :my-data "wow")) & (:my-data (meta fileset)), this is used by Perun


both interesting approaches!


i will file those away in my brain's filing cabinet for future use


@seancorfield ans @juhoteperi thanks for these helpful tips. I may change my code to either of these solutions, but I ended up spitting and slurping into the target directory, has the added benefit of being able to continue with other tasks when one fails. But it's not pretty and potentially doesn't describe the "truth" when there are source code changes.


This is used for example by boot-cljs/reload to store warnings/exceptions with the .cljs.edn file


Yeah, I'm just gun shy of metadata in general. If it's the "official, supported way" of doing that sort of thing in Boot, that's good to know. I can look at changing how we deal with passing information between tasks from the environment to the metadata -- if it makes sense.


Attaching metadata to files with add-meta is supported, attaching directly to fileset is not official


i don't know too much about what kind of object a fileset is


Hello, boot friends. I’m writing a boot library for internal company use which provides tasks for deploying things to our infrastructure. That part’s going nicely, so now I’m looking to see how I might also use it to inject our internal maven wagon and repositories into a boot project. Absent such a library, a boot file would would contain something like (set-env! :repositories #(concat % [["releases" {:url ""}]]) :wagons '[[sparkfund/aws-cli-wagon "1.0.4"]]). How, if at all, would it be recommended for boot libraries to set such environment values in a boot file that requires them? Obvious options would seem to include: at ns load time or by providing a fn to call.


donaldball one thing i considered but never did was 2 set-env! calls. i think it's competitive with 'managed dependencies' maven concept


i.e. one set-env! adds a dependency that contains clj code for loading more dependencies


oh, and i think we now support managed dependencies


i think most of this is applicable (we have the :managed-dependencies set-env! key)


That is cool and I might have uses for that but I don’t think it addresses my question? I think I’m trying to figure out how, if at all, boot libraries can supply env! values, not introduce dependencies


Oh that’s actually looks useful. I use a task like this when I add a new dependency, which usually adds a lot of :exclusions to it, and then I still have to sometimes pin a specific dependency version, even if I don’t use it directly.


@juhoteperi Interesting. I'm always a little nervous of using metadata because so many operations cause it to "evaporate"...

Sebastian Hennebrueder21:11:19

Hamming my head against a wall. I try for hours now to create a task to pack html and images in gui/dist into resources/public. Most boot file commands relate to files. Any idea how to do this with directories?


@usenet the sift task has a move/rename option but it depends a bit on whether you want to copy your files to your actual resources/public directory or the target/public directory that is eventually emitted when you use the target task


Hello all, how do you use local jar from local maven like I use in lein-localrepo in boot?