-
Notifications
You must be signed in to change notification settings - Fork 10
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
Using lazypipe at the end of a stream hangs the Gulp task #14
Comments
If your code above is correct, the issue is that you have set your Your sample code, instead, should be: var lazy = lazypipe()
.pipe(uglify)
.pipe(gulp.dest, destination); If that's not the issue, then it still doesn't make much sense, because events such as You need to make an absolute minimal case example (I recommend a very simple gulp plugin, such as |
Sorry about the botched sample code; wrote that of the top of my head as a minimal version of the actual code, hence the mistake. Here's a fully working sample that reproduces the behaviour:
The files from As I said: the problem actually lies with I should also mention that I'm running this with Gulp 4 instead of Gulp 3, but I don't see how that would change anything. |
Hmm, Gulp 4 might break something, I haven't even begun looking at it (since they took so long getting there). I'm sorry it's giving you trouble, if I get time, I'll look into |
Did some testing and it seems that there is indeed a difference between Gulp 3 and Gulp 4 and - more importantly - that it might not be related to the Running the two minimal examples with Gulp 3 I get the following results:
This must mean that the cause for the Gulp task not finishing is not the lack of a For reference, here's the complete
Note that I used |
I switched to Edit: After looking at it a little closer this might break things with plugins using |
I can confirm same problem using |
I'm encountering the same problem. gulp.dest() doesn't work when inside of lazypipe. Using gulp 3.9.0 example
|
So i understand that for this moment gulp 4 and lazypipe are incompatible? |
As of now, I have no intention of making lazypipe work on Gulp 4. |
For anyone looking, there are some simple workarounds listed here. |
Is there any fixes for this issue? |
No, sorry, Gulp 4 isn't even on my radar. I have no plans on supporting it, probably ever. I get the feeling they don't care too much, either, as it's still not officially released, and it's been over four years since I first heard about the new-and-improved Gulp 4 which would include support for various features I've worked around in Gulp 3 (i.e., run-sequence). I'd be willing to look into a PR if someone else wants to tackle it, but only one that doesn't break existing Gulp 3 functionality, or require major changes to how the code works. I've had trouble in the past with people replacing Alternatively, there's nothing wrong with forking this project, or looking into one of the alternative forks. This one looks like a good option. |
@OverZealous: Hm, |
@strarsis That's too bad. It wasn't my project, so there's nothing I can do. Looks like they removed it from npm, but you can still find it if you look directly, maybe you can use that as a starting point for a fork. |
If you use
lazypipe
at the end of a Gulp stream, the task will be properly executed, but it never finishes. If you run this task standalone this is not problematic; you will just not get the message on the comand line that the task finished. However if the task is used in a series it will cause depending tasks to wait forever.Example code:
At first sight it seems related to #7, but there's actually something different going on.
I tracked the problem down to
stream-combiner
not firing afinish
event and it seems that Gulp relies on that event.I opened an issue on the
stream-combiner
GitHub page:dominictarr/stream-combiner#13
I guess you shouldn't have to change anything to your code, but you might want to follow up on that issue, so that you can update your dependencies when the issue gets fixed.
The text was updated successfully, but these errors were encountered: