scala - Idiomatic sbt custom incremental work criteria -


i'd have compile task depend on task mytask expensive should run if custom metric has changed since last time run. let's have function mycriterion : state => string returns canonical representation of custom criterion.

ideally, compile depend on mytask onlyif mycriterion changed or along lines. see bunch of stuff around tracked.inputchanged , filesinfo.* seems relevant, can't find indication of how use them. behind scenes, i'd mytask run mycriterion, check against cached version on disk if it's present, , if match, nothing @ all. if don't match, i'd run logic of mytask , write current output of mycriterion cache don't perform task unnecessarily next time around (since produce same output each time). compile should happen regardless of whether mytask turns nop or not.

i think i've figured out how use tracked, it's worth: if write tracked.inputchanged(somepath) { case (changed, state: string) => if (changed) ... } , apply result of string (with equiv[string] instance in scope) change checking me. i'm still curious idiomatic way relate tasks kind of pattern though.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -