-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Memoization" / work avoidance / don't run task if sources haven't changed #46
Comments
This seems like a really good idea. File hashes will be expensive to compute if there are many files, so we could use the modtime. I think this is what Make does. |
Note, this is only needed when starting up. The way that Make does this is that it compares the built file timestamp with the source file. If the built file is newer, then it is up-to-date, older then rebuild is needed. |
What about this syntax # we watch these files
watch: [foo]
# when the task runs to completion and exit code 0, touch this file
touch: bar |
Yes that's what I wrote above. Although modtime is imperfect as it will trigger when you save a file and there were no changes.
Does
I would think that if there's a For tasks without outputs though, that might be useful |
Mentioned in #40 (comment) but didn't get an answer. I think this behavior is not currently supported.
Task supports specifying
sources
andgenerates
and will perform a checksum or timestamp (checksum is the default, timestamp matches Make) check on those when specified. If the files listed ingenerates
exist and thesources
haven't changed, the task will not be run.Make supports a similar feature by default that uses timestamps.
Would be good feature parity for Kit to support this, especially as it can result in using a lot less compute and time
The text was updated successfully, but these errors were encountered: