This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-25
Channels
- # adventofcode (3)
- # aleph (24)
- # architecture (8)
- # beginners (53)
- # boot (34)
- # cider (7)
- # clara (68)
- # cljs-dev (6)
- # cljsrn (3)
- # clojars (10)
- # clojure (71)
- # clojure-germany (2)
- # clojure-italy (10)
- # clojure-nl (25)
- # clojure-serbia (4)
- # clojure-spec (13)
- # clojure-uk (48)
- # clojurescript (31)
- # core-async (62)
- # cursive (13)
- # datomic (4)
- # duct (76)
- # editors (4)
- # fulcro (2)
- # immutant (1)
- # instaparse (1)
- # jobs (1)
- # lein-figwheel (1)
- # mount (1)
- # off-topic (12)
- # onyx (8)
- # re-frame (10)
- # reagent (84)
- # reitit (2)
- # ring (2)
- # shadow-cljs (159)
- # spacemacs (2)
- # specter (17)
- # sql (14)
- # tools-deps (10)
- # yada (15)
hey. Speaking of cache. Is there any way built into boot to clear the cache? Instead of doing rm -rf ./boot/cache/
I don’t think there is but you also shouldn’t have to do this... could you give some context why you want to do this?
Yes. We have a package we release as a snapshot, and from what we can understand the cache is not overwritten even if the snapshot is updated in the .m2 directory. So when we try to build the project it will always look at the first version of the package it downloaded. Say if you run the project on a fresh computer, then it will use the latest Snapshot. But if you release a new version of that package in the same snapshot version, you will update to the newest version of that package inside the .m2 directory, but the .boot/cache/tmp/ or .boot/cache/cache/fileset will not be overwritten with the new version.
So we have found out that if you clear the tmp and fileset you force boot to reload our package to the latest version.
Maven only refreshes snapshots in your .m2 every 24hrs IIRC. Could that be the issue? You can check with boot show -U I think
Do you find files related to your snapshot release in .boot/cache dirs? Have you tried more localized clearing of that cache to find out which files need to be deleted for the desired snapshot to be taken into account?
Yes, but trying to navigate the cache is a bit tricky. I've found that just deleting the tmp and fileset folders are enough to force boot to read our latest snapshot. When we update a package and republish it, boot gives an update before running the project that it's downloading a new version of that package, and overwriting the old version. I have tried boot show -U but it updates every snapshot in the project have, and it's a bit too much and I would prefer if it was possible to update only one snapshot at the time. I don't know if this is noteworthy but the snapshot package we're using is mostly containing assets like css and images.
Does boot show -U fix your problem besides the fact that it updates all Snapshots?
oh, that’s long 😮
it might be because i cleared my chache before, and the project has a lot of dependencies.
if I have (comp task1 ... task2)
and I want to have a side effect (e.g println) happen on the dots, what to write? with-pass-thru?
well, sort of: https://github.com/daveyarwood/music-theory/blob/1930872/build.boot#L30-L51
i bet with-pass-thru
would work too. i may not have heard of with-pass-thru
back when i wrote that code
e.g. this works:
(deftask foo []
(with-pass-thru [_]
(println “foo”)))
(deftask bar []
(with-pass-thru [_]
(println “bar”)))
(deftask baz []
(comp (foo) (bar)))
I want to make a task that delegates to other tasks, so it should not check command line args, but just pass them to another task. How?
(deftask metatask []
(fn [next]
(fn [fs]
(if some-condition ((next some-task) fs) (next fs)))))
or maybe ((some-task next) fs)
depending on the order you want
@alandipert when I pass command line args to metatask, then I get an error about unknown option this and that?
are you doing something like (apply metatask *opts*)
?
Say I have task A in build.boot and task B in some other namespace. I want to pass thru the command line options from A to B
oh, i'm not sure there's a way to do that. avoid checking
might be possible by manipulating the metadata on task function you make - enough metadata for boot ro recognize it as a task, but not enough for it to want to validate any options