include generated files in the checksum method
This PR includes generated files into the calculated checksum to trigger task only when needed.
Namely, that implements: https://github.com/go-task/task/issues/2181 and closes: https://github.com/go-task/task/issues/2301 (original bug report for timestamp method but this PR will allow to use default checksum method and preserves original timestamp method behavior)
Example Taskfile.yml:
version: '3'
tasks:
default:
sources:
- input/*.in
generates:
- output/*.out
cmds:
- mkdir -p output
- cp input/one.in output/one.out
- cp input/two.in output/two.out
- initial task run will generate one.out and two.out
- subsequent task run will report task is up to date
- rename of any *.out file and running task will generate the files again
- removal of any *.out file and running task will generate the files again
Closing this, I lost any interest and moved on. It's hard to imagine a build system that is comparing itself to GNU Make and at the same time doesn't implement a core functionality that is make: define rules that specify how to create target files from source files.
Hi @superg.
I know we took a long time to review, but we're volunteers doing this on free time. This is not our full time job. 🙂
With regard to the feature itself, The existing behavior is somewhat by design. We still check if the generates files were all deleted and run again in that case.
I'll add this to my TODO list to maybe review soon.