Getting the list of changed file dependencies from an action

4 views
Skip to first unread message

Daniel Wolf

unread,
Dec 14, 2024, 5:52:08 PM12/14/24
to python-doit
Hi! I'm new to doit, and I'm trying to improve performance in situations where only a few files have changed.

Let's say I define a task that auto-formats all files of a specific type. So I'd glob for these files and add them to file_dep. This way, if none of these have changed, the formatter won't be called at all, which is good. However, if only one or two of these files have changed, the formatter will still run on all files, because it has no way of knowing which have changed.

doit knows which file dependencies have actually changed. Is there a way to access this information from an action? This would allow me to pass only those files that have actually changed to the formatter.
Reply all
Reply to author
Forward
0 new messages