Alex Lewis
Alex Lewis
TTask
Created by Alex Lewis on 8/2/2024 in #help
Should the 'generates' folders be automatically excluded from 'sources' evaluaton?
If I have a project structure of:
project:
- src
- build
filea.txt
fileb.txt
project:
- src
- build
filea.txt
fileb.txt
In the taskfile, if you have:
sources:
- ./**/*
generates:
- ./build/**/*
sources:
- ./**/*
generates:
- ./build/**/*
Then the task will re-run each time. Changing sources to be:
sources:
- ./**/*
- exclude: ./build/**/*
sources:
- ./**/*
- exclude: ./build/**/*
appears to make it detect nothing has changed since the last run. Based on testing, it would appear that without the exclude the build directory is being picked up in the ./**/* pattern in sources. The actual project has a number more files and directories and adding them all as sources feels (in my ignorance) unnecessary. Are there reasons why the entries of generates are not automatically added as exclude entries for sources?
5 replies