-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring error unpipe overrides into core #358
Comments
This might be 100% relevant to this post. https://www.npmjs.org/package/gulp-plumber - the origins at #91 |
@tomasdev Yeah it would be what gulp-plumber is doing but hidden behind a flag and in a different module that is slightly more generic |
👍 |
cc @chrisdickinson who is working on some pipelineError stuff that would also solve this |
More of his work on pipeline error can be found at https://github.com/chrisdickinson/node/commits/feature/adderrorhandler - I think we should implement the shim when there is a PR for this functionality |
This has officially been opened as a PR on node - please chime in at nodejs/node-v0.x-archive#8306 |
@contra until it is done, are you interested in moving gulp-plumber into gulpjs org? |
The nodejs/node-v0.x-archive#8306 referenced above has been closed with the observation that the In nodejs/node-v0.x-archive#8306 (comment) @dominictarr also wrote:
I wonder, could we let gulp stream stages emit With a bit of work, plugins could also detect whether a listener is installed for any of the new events, and if not issue a classic error for the sake of compatibility with older versions of gulp, with older styles of how to build gulp pipelines, and with stream handling libraries which are unaware of any gulp-specific event types. The converse problem, of plugins not switched over to generating these new events, would probably be more problematic in the near future. I realize that what I'm suggesting here is not a step towards what the current title of this issue is requesting. It's more a discussion of alternative approaches to address the same underlying problem. If you feel an urgent need, you could combine the above with the monkey-patching approach for |
I'm envisioning a vinyl object marked as an error going into the stream. You could then filter those off in by using Effectively, this makes a gulp stream be two node streams, one for vinyl objects, one for errors. |
@contra it seems that https://www.npmjs.com/package/pump solves all of the problems. Do you think we should expose that as a method in gulp? I could see there being a much more complex solution, but maybe going the simplest route is better. Otherwise, we can just document the recommendation to use |
@phated How does pump solve this problem? Doesn't seem to do anything for error management. |
@contra The complex solution would be for |
Node's recommended pattern is to use |
This will be off by default, but I think this is a common enough case that people would like this.
I envision the API looking like this:
will block unpipe events downstream
The text was updated successfully, but these errors were encountered: