Skip to content
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

v5 : Series tasks fail where running individually pass #2776

Closed
ps-mattstuart opened this issue Apr 3, 2024 · 4 comments
Closed

v5 : Series tasks fail where running individually pass #2776

ps-mattstuart opened this issue Apr 3, 2024 · 4 comments

Comments

@ps-mattstuart
Copy link

ps-mattstuart commented Apr 3, 2024

What were you expecting to happen?

Running a task defined as a series to pass the same as running the tasks from command line

What actually happened?

When running as a series the tasks fail.

[17:45:04] The following tasks did not complete: ab, b
Did you forget to signal async completion?

Please give us a sample of your gulpfile

/* VERSION 1 */
let gulp = require("gulp");
let rename = require("gulp-rename");

gulp.task('a', () => {
    return gulp.src('gulpfile.js')
        .pipe(rename('gulpfile.js.one'))
        .pipe(gulp.dest('_out'))
})
gulp.task('b', () => {
    return gulp.src('gulpfile.js')
        .pipe(rename('gulpfile.js.two'))
        .pipe(gulp.dest('_out'))
})
gulp.task('ab', gulp.series('a', 'b'))
/* VERSION 2 */
let gulp = require("gulp");
let rename = require("gulp-rename");

function a() {
    return gulp.src('gulpfile.js')
        .pipe(rename('gulpfile.js.one'))
        .pipe(gulp.dest('_out'))
}
function b() {
    return gulp.src('gulpfile.js')
        .pipe(rename('gulpfile.js.two'))
        .pipe(gulp.dest('_out'))
}
exports.a = a
exports.b = b
exports.ab = gulp.series(a, b)

Terminal output / screenshots

$ gulp a
[17:44:33] Using gulpfile .../gulpfile.js
[17:44:33] Starting 'a'...
[17:44:35] Finished 'a' after 1.99 s
$ gulp b
[17:44:33] Using gulpfile .../gulpfile.js
[17:44:33] Starting 'b'...
[17:44:35] Finished 'b' after 1.98 s
$ gulp a b
[17:44:50] Using gulpfile .../gulpfile.js
[17:44:50] Starting 'a'...
[17:44:50] Starting 'b'...
[17:44:52] Finished 'a' after 2.23 s
[17:44:52] Finished 'b' after 2.23 s
gulp ab
[17:45:01] Using gulpfile .../gulpfile.js
[17:45:01] Starting 'ab'...
[17:45:01] Starting 'a'...
[17:45:03] Finished 'a' after 2.6 s
[17:45:03] Starting 'b'...
[17:45:04] The following tasks did not complete: ab, b
Did you forget to signal async completion?
node:internal/process/report:91
  set reportOnUncaughtException(trigger) {
                               ^

RangeError: Maximum call stack size exceeded
    at set reportOnUncaughtException [as reportOnUncaughtException] (node:internal/process/report:91:32)
    at setUncaughtExceptionCaptureCallback (node:internal/process/execution:106:46)
    at updateExceptionCapture (node:domain:179:5)
    at Domain.enter (node:domain:325:3)
    at EventEmitter.emit (node:domain:551:10)
    at processDirents (node_modules/glob-stream/index.js:88:10)
    at next (node_modules/now-and-later/lib/mapSeries.js:43:5)
    at handler (node_modules/now-and-later/lib/mapSeries.js:57:9)
    at f (node_modules/once/once.js:25:25)
    at processDirents (node_modules/glob-stream/index.js:113:7)

Node.js v18.17.1

Please provide the following information:

  • Linux dev-vagrant 5.15.0-92-generic bus error #102-Ubuntu SMP Wed Jan 10 09:37:39 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
  • node -v : v18.17.1
  • npm -v : 10.5.0
  • gulp:
gulp -v
CLI version: 3.0.0
Local version: 5.0.0

Additional information

I fully accept that I might be doing the series thing wrong. I have tried with not using the string version of my tasks instead supplying functions but I get the same effect.

NOTE: Changing series() to parallel() results in successful runs!

@phated
Copy link
Member

phated commented Apr 4, 2024

It looks like you didn't include the entire stack trace, which seems to indicate something bigger of a problem. Please provide the entire trace

@ps-mattstuart
Copy link
Author

Fullstack added but i'm testing more.. a completely fresh project doesn't appear to have the same issues. Continuing with diagnoses..

@phated
Copy link
Member

phated commented Apr 4, 2024

This is a duplicate of gulpjs/glob-stream#125

We're still working on a fix

@yocontra
Copy link
Member

yocontra commented Apr 6, 2024

Going to close these, please follow gulpjs/glob-stream#125 for updates

@yocontra yocontra closed this as completed Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants