-
Notifications
You must be signed in to change notification settings - Fork 30k
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: remove deprecated API #13702
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,12 +95,16 @@ methods, the `options.customFds` option is deprecated. The `options.stdio` | |
option should be used instead. | ||
|
||
<a id="DEP0007"></a> | ||
### DEP0007: cluster worker.suicide | ||
### DEP0007: Replace cluster worker.suicide with worker.exitedAfterDisconnect | ||
|
||
Type: Runtime | ||
Type: End-of-Life | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather unfortunate terminology here, in context. I don't have a better suggestion though :\ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could replace all instances of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a fixed term as defined in deprecations.md, so I don't think we want to change this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noted the irony also. To change this we would need a change to the deprecation policy as a whole, and the usage here is consistent with general usage in the industry. That's not to say it's particularly good, just that for now there isn't a better option. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tniessen I know, as I said I’m suggesting that we change the terminology, not this single instance. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @addaleax We both wrote our comments within a minute, I did not see your comment until I had written mine, I was not responding to you ;) |
||
|
||
Within the `cluster` module, the [`worker.suicide`][] property has been | ||
deprecated. Please use [`worker.exitedAfterDisconnect`][] instead. | ||
In an earlier version of the Node.js `cluster`, a boolean property with the name | ||
`suicide` was added to the `Worker` object. The intent of this property was to | ||
provide an indication of how and why the `Worker` instance exited. In Node.js | ||
6.0.0, the old property was deprecated and replaced with a new | ||
[worker.exitedAfterDisconnect][] property. The old property name did not | ||
precisely describe the actual semantics and was unnecessarily emotion-laden. | ||
|
||
<a id="DEP0008"></a> | ||
### DEP0008: require('constants') | ||
|
@@ -689,7 +693,6 @@ Type: Runtime | |
[`util.puts()`]: util.html#util_util_puts_strings | ||
[`util`]: util.html | ||
[`worker.exitedAfterDisconnect`]: cluster.html#cluster_worker_exitedafterdisconnect | ||
[`worker.suicide`]: cluster.html#cluster_worker_suicide | ||
[alloc]: buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding | ||
[alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size | ||
[from_arraybuffer]: buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this word continues to appear in this file, it should have a content warning at the top, and/or a content warning and a click-through to view this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with a content warning within this line item (where it's more likely to be seen when someone clicks through to find the information for the specific deprecation code. However, it would be helpful if you had a specific suggestion for the wording of such a warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to not include
worker.suicide
inside the error message but rather a reference to the documentation?In the extended documentation we could start with
We can then make "click here" an href to the next header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name of the property is not included in the warning message that is printed to the console., it is included only in this one deprecations.md document. I'd rather not make it any more complicated than that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be an improvement:
A much better approach would add a CSS rule like this:
and then
I realize this adds some complexity, but it's not like it's something we'll have to do very often, and it seems like a very reasonable cost for the benefit it provides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoot. I just now saw this comment come through @isaacs .... of course it was immediately after landing. This specific additional change can be handled and discussed via a separate PR. Sorry about missing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasnell No problem. Improvements can come iteratively :) Do you want me to take a crack at writing that update, or do you want to tackle it?