task icon indicating copy to clipboard operation
task copied to clipboard

include generated files in the checksum method

Open superg opened this issue 6 months ago • 2 comments

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

superg avatar Jul 02 '25 02:07 superg

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.

superg avatar Nov 04 '25 14:11 superg

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.

andreynering avatar Nov 04 '25 15:11 andreynering