OverZealous / run-sequence

Run a series of dependent gulp tasks in order
MIT License
961 stars 56 forks source link

sequence stops after few tasks #87

Closed troublete closed 7 years ago

troublete commented 7 years ago

Hello, i've recently came across a significant problem with using run-sequence. Couldn't find a reason though, but maybe you smart people already have had this issue sometime and can help me. :)

So I'm working on a huge project with a pretty big gulp setup. The "default" update task is supposed to run a sequence of tasks to update a vendor directory (shell command execution), concat files, copy them to a different directory, run uglify and cssmin. All those tasks (except the shell command) are native gulp tasks so there is no possibility that the process of each task itself can result in an error (or at least there shouldn't be) that cancels out the sequence.

Even though: run-sequence starts to run the first 2 tasks, but stops after that and also doesn't end the default task... Did you ever have had this problem, and know a solution? or at least a reasoning why this is happening.

I'm using:

OverZealous commented 7 years ago

You aren't providing enough information here for me to help, but my guess is that your tasks aren't returning correctly. If your tasks don't return a promise or a stream, or use a callback, they are treat as synchronous tasks, and assumed to end immediately.

Without further information, I can only assume this is it. It's the cause of about 95% of issues opened on this library.

Other than that, run-sequence is a very simple library. It doesn't really do that much, just start tasks and listen in for completion events.

You should narrow down your issue to as small of an example as you can get. I'd recommend figuring out exactly which task is stopping, then try some other things. One thing you can do is use native Gulp dependencies to see if that task is returning correctly.

troublete commented 7 years ago

Oh well actually that already might solve my problem. Will check on monday.

Thanks for quick response. Have a nice weekend man! :)

OverZealous commented 7 years ago

Thanks, you, too!

troublete commented 7 years ago

Alright, apparently gulp.start doesn't return any of the required formats :D fixed the issue with calling sub tasks I had. Thanks for the help.