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

cluster: deprecate worker.suicide #3747

Merged
merged 1 commit into from Jun 5, 2016
Merged

Conversation

evanlucas
Copy link
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
Copy link
Member

jasnell commented Nov 18, 2015

@nodejs/ctc discussed today. decision was made to add a deprecation warning for the .suicide flag in the v5.x docs along with the new alias added to the code (There may be a bit more discussion on exactly what label the new alias will have). A hard deprecation (using util.deprecate) notice will be added in will not land until at least the v6.x stable but could happen later than that. Because of backwards compatibility concerns, no target has been set for the actual removal of the .suicide term. There will be no change in any LTS branch.

(updated to be specific that the deprecation warning in v5.x will be in the docs and alias added to the code)
(updated again to reflect reality ;-) ... thanks @Fishrock123 )

@cjihrig
Copy link
Contributor

cjihrig commented Jun 1, 2016

@evanlucas what are your plans for this PR?

@evanlucas
Copy link
Contributor Author

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

@evanlucas
Copy link
Contributor Author

Updated. PTAL. Thanks!

@cjihrig
Copy link
Contributor

cjihrig commented Jun 2, 2016

LGTM

@evanlucas
Copy link
Contributor Author

@jasnell
Copy link
Member

jasnell commented Jun 2, 2016

LGTM

1 similar comment
@Qard
Copy link
Member

Qard commented Jun 3, 2016

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
Contributor Author

Landed in f44b18f. Thanks!

@ChALkeR
Copy link
Member

ChALkeR commented Jun 5, 2016

@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
Contributor Author

@ChALkeR it only exists in v6+

@ChALkeR
Copy link
Member

ChALkeR commented Jun 5, 2016

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

@evanlucas
Copy link
Contributor Author

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

@ChALkeR
Copy link
Member

ChALkeR commented Jun 5, 2016

@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
Contributor Author

A discussion issue would be good I think. I agree with what you are saying btw.

@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.

None yet

6 participants