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

lib: fixme defer error to next tick #4670

Closed

Conversation

tflanagan
Copy link
Contributor

Fixes FIXMEs in lib/internal/child_process.js ref's #4642

...
      process.nextTick(callback, ex);
    } else {
      this.emit('error', ex);  // FIXME(bnoordhuis) Defer to next tick.
    }
    return false;
...
        process.nextTick(callback, ex);
      } else {
        this.emit('error', ex);  // FIXME(bnoordhuis) Defer to next tick.
      }
    }

@mscdex mscdex added the child_process Issues and PRs related to the child_process subsystem. label Jan 13, 2016
@jasnell jasnell added the semver-minor PRs that contain new features and should be released in the next minor version. label Jan 13, 2016
@jasnell
Copy link
Member

jasnell commented Jan 13, 2016

Marking this as a possible semver-minor due to the change in the timing. @bnoordhuis .. thoughts on this one?

@cjihrig
Copy link
Contributor

cjihrig commented Jan 13, 2016

Wouldn't a change in timing be a semver-major change?

@jasnell
Copy link
Member

jasnell commented Jan 14, 2016

Possibly yes.

@tflanagan
Copy link
Contributor Author

I've updated this PR to match master

@jasnell
Copy link
Member

jasnell commented Jan 23, 2016

@bnoordhuis ... thoughts?

@tflanagan
Copy link
Contributor Author

/poke @bnoordhuis

@Trott
Copy link
Member

Trott commented Feb 18, 2016

@thefourtheye
Copy link
Contributor

Related work: #5251

@jasnell
Copy link
Member

jasnell commented Mar 22, 2016

@bnoordhuis @tflanagan ... ping

@bnoordhuis
Copy link
Member

LGTM if tests pass. I'd make it semver-major just to be safe. CI: https://ci.nodejs.org/job/node-test-pull-request/2027/

@jasnell jasnell added semver-major PRs that contain breaking changes and should be released in the next major version. and removed semver-minor PRs that contain new features and should be released in the next minor version. labels Mar 22, 2016
@MylesBorins
Copy link
Contributor

should we add this to the v7 milestone?

@imyller
Copy link
Member

imyller commented Sep 15, 2016

FIXME states that emitting error should be deferred to next tick. setImmediate does this.

process.nextTick and setImmediate have confusing names, since setImmediate will actually defer emitting the error to next tick and process.nextTick will emit error within current tick cycle.

Thus nextTick has lower latency, but does it matter in this case?

@Trott
Copy link
Member

Trott commented Sep 16, 2016

LGTM. Since it's semver-major (out of caution, not because this is actually expected to cause huge problems), I'm going to ping @nodejs/ctc to see if anyone else wants to LGTM or wait wait wait wat no no no this.

Also, since it's been dormant a while, might be good to run one last CI. Also a CITGM because: semver-major.

CI: https://ci.nodejs.org/job/node-test-pull-request/4076/
CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/387/

@mscdex
Copy link
Contributor

mscdex commented Sep 16, 2016

IMHO I don't think it has to be until the next actual tick, I think the original idea was to allow the user to have time to set up an error event handler before it's emitted. process.nextTick() accomplishes this without further unnecessary delay. It's also what is used throughout the code base whenever similar situations arise.

@imyller
Copy link
Member

imyller commented Sep 16, 2016

Agree with @mscdex

LGTM pending new CI and ctc comments

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@santigimeno
Copy link
Member

LGTM

@evanlucas
Copy link
Contributor

Running CI one more time: https://ci.nodejs.org/job/node-test-pull-request/4126/

@jasnell
Copy link
Member

jasnell commented Feb 28, 2017

ping @nodejs/ctc ... did we want to land this?

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Mar 1, 2017
@fhinkel
Copy link
Member

fhinkel commented May 23, 2017

There's two approvals and no rejection, so I'd say...yes?

@gibfahn
Copy link
Member

gibfahn commented May 23, 2017

3 ctc approvals (@bnoordhuis @Trott @cjihrig ) and 2 other collaborator ones ( @imyller @santigimeno) so it should be good to land, probably needs another CI and CitGM run though.

@BridgeAR
Copy link
Member

Seems like this is not stalled and it only has to land?

@Trott Trott removed the stalled Issues and PRs that are stalled. label Aug 10, 2017
@Trott
Copy link
Member

Trott commented Aug 10, 2017

Trott pushed a commit to Trott/io.js that referenced this pull request Aug 13, 2017
PR-URL: nodejs#4670
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ilkka Myller <[email protected]>
@Trott
Copy link
Member

Trott commented Aug 13, 2017

Landed in f2b01cb.

Triageathon 2017!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.