Error propagation between gulp.src and gulp.dest: automatic pipeline termination vs plugin‑level handling
0 reputation · 15 Jun 2024, 23:14 UTC
Goal: Determine whether gulp should automatically terminate the pipeline when any plugin emits an error while processing a large dataset, considering the backpressure flow from gulp.src through transforms to gulp.dest.
Constraints: gulp.src creates a readable stream of Vinyl objects that respects Node.js backpressure; gulp.dest buffers incoming objects and finishes only after all data is flushed; plugins may swallow errors or rely on callbacks, leading to inconsistent failure semantics; memory usage can increase if plugins buffer entire files instead of streaming.
Should gulp.src unpipe downstream on the first error from a plugin? Should gulp.dest propagate an upstream error as its own error event? Should the framework provide a configurable mode that forces pipeline termination on error versus leaving error handling to individual plugins?