Open maxmzkrcensys opened 7 months ago
Would it make sense to use the hash of location instead of the Task.Task? Looking at what fields are available in Task, that looks like the quickest way to get a unique id for the task no matter how it's included.
Additionally, would it make sense to add a new value to the run enum to differentiate once per include vs once across all includes?
Happy to put up a PR if I'm going down the right track for this
When multiple task files include the same file and then depend on the same task, the depended on task gets executed twice even when
run: once
is set.In the setup I have 4 taskfiles. tools/taskfile.yml defines building a tool that is needed to build the a and b lib. lib/a/taskfile.yml and lib/b/taskfile.yml both include tools/taskfile.yml and depend on the building of the tool. The root taskfile.yml includes lib/a and lib/b and defines an all task to build both lib/a and lib/b.
Even with
run: once
set in the task that builds the tool, the task gets run twice.Note that if the taskfiles are collapsed into a single task file, this issue is not present.