Duplicate gulp.dest writes after Gulp 4 task retry
0 reputation · 05 Aug 2021, 19:55 UTC
Duplicate gulp.dest writes after Gulp 4 task retry
Goal: retry a failed Gulp 4 build task without re-emitting files that already passed through gulp.dest.
Gulp 4 streams vinyl files from gulp.src through plugins to gulp.dest, and each destination write overwrites the target path without recording which files were successfully emitted. The lastRun() and since options filter source files by timestamp, but they do not prevent rewriting outputs from an earlier partial run. Core gulp has no built-in retry mechanism or transactional write log, so retry behavior depends on wrapper code or community plugins.
Assumes Gulp 4.x. It is unclear whether destination writes can be made idempotent using only documented Gulp 4 APIs, or whether the task completion signal (async, promise, stream, or callback) changes which files are safe to exclude on retry.
- Can gulp.dest skip a write when the destination path already holds output from the same task run?
- Is there a documented Gulp 4 way to make task retry idempotent without a custom write-log plugin?
- Does the task completion signal affect which source files are safe to exclude on retry?