Extracted from #277 as a dedicated and hopefully well-presented feature request.
Use case: as a user developping tasks in a dodo.py
file, I want to have a quick way (=without changing my code) to understand why a task is skipped when I think it should not, and why one is re-run when I think it should be skipped. This is a productivity/debuggability use case.
For example in make
there is make -d
, I just discovered it today in this stack overflow discussion. In maven
there was the -X
flag. In pytest
there is the -v
flag.
I would suggest to support such a "verbose" flag (short name / long name to be defined) in doit
.
From what I understand, the reason why tasks are run is either a dependency change or file dep change or target change (or an uptodate=False
, or result_dep
change). And of course it is known by doit
otherwise that would not work today. So it should be quite easy to print that information to the console before task skip or task run.
For what's worth, my current workaround for this is to use the following why_am_i_running
python action explicitly at the beginning of all my task actions lists:
from os.path import exists
def why_am_i_running(task, changed):
for t in task.targets:
if not exists(t):
print("Running task '%s' because one of its targets does not exist anymore: '%s'" % (task, t))
return
print("Running task '%s' because the following changed: '%s'" % (task, changed))
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too