cluster: deprecate worker.suicide by evanlucas · Pull Request #3747 · nodejs/node · GitHub
Skip to content

cluster: deprecate worker.suicide#3747

Merged
evanlucas merged 1 commit into
nodejs:masterfrom
evanlucas:voluntarydep
Jun 5, 2016
Merged

cluster: deprecate worker.suicide#3747
evanlucas merged 1 commit into
nodejs:masterfrom
evanlucas:voluntarydep

Conversation

@evanlucas

Copy link
Copy Markdown
Contributor

Follow up to #3743

Only the 2nd commit is applicable here.

@evanlucas evanlucas added cluster Issues and PRs related to the cluster subsystem. semver-major PRs that contain breaking changes and should be released in the next major version. labels Nov 10, 2015
@jasnell

jasnell commented Nov 18, 2015

Copy link
Copy Markdown
Member

@cjihrig

cjihrig commented Jun 1, 2016

Copy link
Copy Markdown
Contributor

@evanlucas what are your plans for this PR?

@evanlucas

Copy link
Copy Markdown
Contributor Author

@cjihrig I was planning to rebase this week and get it updated

@evanlucas

Copy link
Copy Markdown
Contributor Author

Updated. PTAL. Thanks!

@cjihrig

cjihrig commented Jun 2, 2016

Copy link
Copy Markdown
Contributor

LGTM

@evanlucas

Copy link
Copy Markdown
Contributor Author

@jasnell

jasnell commented Jun 2, 2016

Copy link
Copy Markdown
Member

LGTM

1 similar comment
@Qard

Qard commented Jun 3, 2016

Copy link
Copy Markdown
Member

LGTM

Deprecate worker.suicide in favor of worker.exitedAfterDisconnect.

PR-URL: nodejs#3747
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
@evanlucas evanlucas closed this Jun 5, 2016
@evanlucas evanlucas deleted the voluntarydep branch June 5, 2016 21:09
@evanlucas evanlucas merged commit f44b18f into nodejs:master Jun 5, 2016
@evanlucas

Copy link
Copy Markdown
Contributor Author

Landed in f44b18f. Thanks!

@ChALkeR

ChALkeR commented Jun 5, 2016

Copy link
Copy Markdown
Member

@evanlucas What versions was the new property backported to (0.10, 0.12, 4.x, 5.x)? Am I correct that this means that the library owners would have to either:

  1. Perform an cumbersome detection to check what property they should use.
  2. Drop old Node.js versions support prematurely.
  3. Live with a warning for some time (half a year or so).

@evanlucas

Copy link
Copy Markdown
Contributor Author

@ChALkeR it only exists in v6+

@ChALkeR

ChALkeR commented Jun 5, 2016

Copy link
Copy Markdown
Member

@evanlucas Perhaps it should be backported at least to 4.x as an alias to .suicide?

@evanlucas

Copy link
Copy Markdown
Contributor Author

Agreed. I'll put together a pr tomorrow for it.

@ChALkeR

ChALkeR commented Jun 5, 2016

Copy link
Copy Markdown
Member

@evanlucas Personally, I don't like the idea of forcing library authors to resort to detection code like

var connected = !(worker.hasOwnProperty('exitedAfterDisconnect') ? worker.exitedAfterDisconnect : worker.suicide);

instead of

var connected = !worker.suicide;

or

var connected = !worker.exitedAfterDisconnect;

@nodejs/ctc
Ideally, semver-minor counterparts of such changes should get backported to all supported versions before releasing an actual hard deprecation, IMO (if there is no hurry and the code was documented before, of course). The same for #7152. Perhaps we need to discuss that in a separate issue?

@evanlucas

Copy link
Copy Markdown
Contributor Author

@jasnell jasnell mentioned this pull request Oct 14, 2016
jasnell added a commit to jasnell/node that referenced this pull request Oct 24, 2016
Notable Changes:

* Buffer
  * Passing invalid input to Buffer.byteLength will now throw an error [nodejs#8946](nodejs#8946).
  * Calling Buffer without new is now deprecated and will emit a process warning [nodejs#8169](nodejs#8169).
  * Passing a negative number to allocUnsafe will now throw an error [nodejs#7079](nodejs#7079).
* Child Process
  * The fork and execFile methods now have stronger argument validation [nodejs#7399](nodejs#7399).
* Cluster
  * The worker.suicide method is deprecated and will emit a process warning [nodejs#3747](nodejs#3747).
* Deps
  * V8 has been updated to 5.4.500.36 [nodejs#8317](nodejs#8317), [nodejs#8852](nodejs#8852), [nodejs#9253](nodejs#9253).
  * NODE_MODULE_VERSION has been updated to 51 [nodejs#8808](nodejs#8808).
* File System
  * A process warning is emitted if a callback is not passed to async file system methods [nodejs#7897](nodejs#7897).
* Intl
  * Intl.v8BreakIterator constructor has been deprecated and will emit a process warning [nodejs#8908](nodejs#8908).
* Promises
  * Unhandled Promise rejections have been deprecated and will emit a process warning [nodejs#8217](nodejs#8217).
* Punycode
  * The `punycode` module has been deprecated [nodejs#7941](nodejs#7941).
* URL
  * An Experimental WHATWG URL Parser has been introduced [nodejs#7448](nodejs#7448).
jasnell added a commit that referenced this pull request Oct 25, 2016
Notable Changes:

* Buffer
  * Passing invalid input to Buffer.byteLength will now throw an error [#8946](#8946).
  * Calling Buffer without new is now deprecated and will emit a process warning [#8169](#8169).
  * Passing a negative number to allocUnsafe will now throw an error [#7079](#7079).
* Child Process
  * The fork and execFile methods now have stronger argument validation [#7399](#7399).
* Cluster
  * The worker.suicide method is deprecated and will emit a process warning [#3747](#3747).
* Deps
  * V8 has been updated to 5.4.500.36 [#8317](#8317), [#8852](#8852), [#9253](#9253).
  * NODE_MODULE_VERSION has been updated to 51 [#8808](#8808).
* File System
  * A process warning is emitted if a callback is not passed to async file system methods [#7897](#7897).
* Intl
  * Intl.v8BreakIterator constructor has been deprecated and will emit a process warning [#8908](#8908).
* Promises
  * Unhandled Promise rejections have been deprecated and will emit a process warning [#8217](#8217).
* Punycode
  * The `punycode` module has been deprecated [#7941](#7941).
* URL
  * An Experimental WHATWG URL Parser has been introduced [#7448](#7448).

PR-URL: #9099
jasnell added a commit that referenced this pull request Oct 25, 2016
Notable Changes:

* Buffer
  * Passing invalid input to Buffer.byteLength will now throw an error [#8946](#8946).
  * Calling Buffer without new is now deprecated and will emit a process warning [#8169](#8169).
  * Passing a negative number to allocUnsafe will now throw an error [#7079](#7079).
* Child Process
  * The fork and execFile methods now have stronger argument validation [#7399](#7399).
* Cluster
  * The worker.suicide method is deprecated and will emit a process warning [#3747](#3747).
* Deps
  * V8 has been updated to 5.4.500.36 [#8317](#8317), [#8852](#8852), [#9253](#9253).
  * NODE_MODULE_VERSION has been updated to 51 [#8808](#8808).
* File System
  * A process warning is emitted if a callback is not passed to async file system methods [#7897](#7897).
* Intl
  * Intl.v8BreakIterator constructor has been deprecated and will emit a process warning [#8908](#8908).
* Promises
  * Unhandled Promise rejections have been deprecated and will emit a process warning [#8217](#8217).
* Punycode
  * The `punycode` module has been deprecated [#7941](#7941).
* URL
  * An Experimental WHATWG URL Parser has been introduced [#7448](#7448).

PR-URL: #9099
imyller added a commit to imyller/meta-nodejs that referenced this pull request Oct 25, 2016
    Notable Changes:

    * Buffer
      * Passing invalid input to Buffer.byteLength will now throw an error [#8946](nodejs/node#8946).
      * Calling Buffer without new is now deprecated and will emit a process warning [#8169](nodejs/node#8169).
      * Passing a negative number to allocUnsafe will now throw an error [#7079](nodejs/node#7079).
    * Child Process
      * The fork and execFile methods now have stronger argument validation [#7399](nodejs/node#7399).
    * Cluster
      * The worker.suicide method is deprecated and will emit a process warning [#3747](nodejs/node#3747).
    * Deps
      * V8 has been updated to 5.4.500.36 [#8317](nodejs/node#8317), [#8852](nodejs/node#8852), [#9253](nodejs/node#9253).
      * NODE_MODULE_VERSION has been updated to 51 [#8808](nodejs/node#8808).
    * File System
      * A process warning is emitted if a callback is not passed to async file system methods [#7897](nodejs/node#7897).
    * Intl
      * Intl.v8BreakIterator constructor has been deprecated and will emit a process warning [#8908](nodejs/node#8908).
    * Promises
      * Unhandled Promise rejections have been deprecated and will emit a process warning [#8217](nodejs/node#8217).
    * Punycode
      * The `punycode` module has been deprecated [#7941](nodejs/node#7941).
    * URL
      * An Experimental WHATWG URL Parser has been introduced [#7448](nodejs/node#7448).

Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
@tniessen tniessen added the deprecations Issues and PRs related to deprecations. label Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cluster Issues and PRs related to the cluster subsystem. deprecations Issues and PRs related to deprecations. 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.

6 participants