#hoplon

/

      • jjmojojjmojo has quit
      • jjmojojjmojo joined the channel
      • TheAncientGoat joined the channel
      • TheAncientGoat joined the channel
      • BartAdv joined the channel
      • BartAdv
        Hi, I've been looking at boot lately, and i have troubles finding an answer to one question:
      • How does boot determine whether task needs to be run or cached output can be used instead? Does it do this at all or task itself needs to handle this?
      • Deraen
        Tasks need to handle this themselves
      • Usually it is super simple, check for example boot-less: https://github.com/Deraen/boot-less/blob/master...
      • Several tasks use the same logic to get list of changed input files and only run compilation etc. for those files
      • BartAdv
        Oh, thanks. Im using your lib by the way, Deraen! Just never looked at its code:)
      • boot-bower doesnt use input files though, it generates them from the invocation parameters. So in fact I'd need to detect change in parameters...
      • That's why I asked if boot does things like that, seems like it could (it manages some cache after all)
      • Hmm, the last-less is an atom that's part of captured state of the task. So am I right it does not work between invocation and only in some sort of watch mode?
      • Deraen
        True
      • Other than maven cache, there is (usually) no cache between Boot invocations
      • E.g. Cljs build is always done from clean, similar to running lein clean before build
      • Always = After Boot invocation
      • We did talk about having cache-dirs in addition to current tmp-dirs
      • I don't remember if this got ever implemented
      • BartAdv
        Interesting - seems like it favours 'watch' type of tasks but still, the initial overhead is quite big
      • Deraen
      • Yeah I guess with bower task it would make sense to keep the component dir between the runs
      • similar to how maven cache works
      • hmm though bower also has "global" cache, so it shouldn't download everything again each time? ~/.cache/bower
      • BartAdv
        Well, to be honest it would make to cache everything, if side effects are under control, that is, tasks can be considered referentially transparent, then maybe it would be quite safe?
      • Deraen
        Yeah I think that was the idea we had with cache dirs
      • We had idea to use them to make initial Cljs compilation faster, but that got never implemented as Cljs initial compilation got faster
      • BartAdv
        In my scenario bower deps are not changing often, very rarely even, it is a waste of time currently. Will check bower cache anyway, firstly
      • Deraen
        A easy way for bower to cache stuff would be just to use local directory instead of temp dir
      • The task could use e.g. ./bower_components dir in the work dir, write stuff to that, and add it to fileset using add-resource so the files are available in the classpaht
      • and to other tasks
      • BartAdv
        Work dir- you mean dir where sources are?
      • Anyway, thanks for pointers, will be playing with it later on
      • Deraen
        work dir = the dir with build.boot
      • and there the source-dirs etc. are
      • schmir joined the channel
      • schmir has quit
      • ikitommi_ joined the channel
      • mathiasx_ joined the channel
      • jgmize_ joined the channel
      • michaniskin_ joined the channel
      • Empperi_ joined the channel
      • michel_slm_ joined the channel
      • ikitommi has quit
      • mathiasx has quit
      • rigalo__ has quit
      • Empperi has quit
      • jgmize has quit
      • rigalo__ joined the channel
      • mathiasx_ is now known as mathiasx
      • rigalo__ has quit
      • rigalo__ joined the channel
      • ikitommi_ is now known as ikitommi
      • BartAdv has quit
      • BartAdv joined the channel
      • jjmojojjmojo has quit
      • jjmojojjmojo joined the channel
      • TheAncientGoat has quit
      • mr-foobar has quit
      • mr-foobar joined the channel
      • BartAdv
        Deraen, I've found also this: https://github.com/boot-clj/boot/blob/fb64f8e72.... This seems to be doing the trick for me