Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
doc: documentation deprecation of process.binding#22004
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
This is the first step in a long process of deprecating `process.binding()` and replacing it with `internalBinding()`. Eventually, once we have replaced internal uses of `process.binding()` with `internalBinding()`, we can escalate to a runtime deprecation and eventual end-of-life.
nodejs-github-bot commented Jul 27, 2018
mcollina left a comment
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.
LGTM
doc/api/deprecations.md Outdated
| Type: Documentation-only | ||
| The `process.binding()` API is intended for use strictly by Node.js internal | ||
| code to provide a bridge between Node.js' JavaScript and native code layer. |
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.
It might be best to avoid the possessive by removing a couple words so it becomes: bridge between JavaScript and native code.
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.
Even better perhaps is remove everything after code from this sentence. You don't have to explain what the function does. That's superfluous information in this case.
doc/api/deprecations.md Outdated
| The `process.binding()` API is intended for use strictly by Node.js internal | ||
| code to provide a bridge between Node.js' JavaScript and native code layer. | ||
| Use of `process.binding()` by user-land code is unsupported. |
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.
AFAIK, we use userland everywhere and user-land nowhere, so let's stick with userland.
doc/api/deprecations.md Outdated
| Type: Documentation-only | ||
| The `process.binding()` API is intended for use strictly by Node.js internal |
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.
Nit: remove strictly
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.
Why?
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.
It's unnecessary. It's also imprecise. "only" would be more precise.
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.
So maybe this?:
process.binding()is intended for use by Node.js internal code only.
Trott commented Jul 27, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Putting all my nits together (and one or two that I didn't leave), the wording might be simplified to:
...or (adding one word more):
|
ChALkeR left a comment • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
We needed this for a long time.
Technically, it was never part of a documented public API afaik so we could just move to runtime deprecation, but given that the usage (of certain modules) was widespread, it seems to be a good decision to doc-deprecate it first.
ChALkeR commented Jul 27, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@jasnell Perhaps DEP0103 text should be updated (in the «should be avoided» part) to mention this deprecation? |
jdalton commented Jul 28, 2018
I'd be great to make some things, like |
mcollina commented Jul 28, 2018
@jdalton can you please open an issue on how you use process.bindings(‘config’), and what would you need to have as a public API? Thanks! |
targos left a comment
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.
LGTM with @Trott comments addressed
mhdawson left a comment
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.
LGTM
jasnell commented Jul 29, 2018
jasnell commented Jul 29, 2018
Will land this on Monday if there are no objections by then. |
doc/api/deprecations.md Outdated
| Type: Documentation-only | ||
| The `process.binding()` API is intended for use by Node.js internal only |
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.
by Node.js internal only code -> by Node.js internal code only or only by Node.js internal code.
ChALkeR commented Jul 29, 2018
What about DEP0103? |
jasnell commented Jul 29, 2018
Ah, right, yeah I'll update the description for that |
jasnell commented Aug 1, 2018
This is the first step in a long process of deprecating `process.binding()` and replacing it with `internalBinding()`. Eventually, once we have replaced internal uses of `process.binding()` with `internalBinding()`, we can escalate to a runtime deprecation and eventual end-of-life. PR-URL: #22004 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
jasnell commented Aug 1, 2018
Landed in 182051b |
ChALkeR commented Aug 1, 2018
@jasnell Is it supposed to include the deprecation codes as |
targos commented Aug 1, 2018
The deprecation number should be assigned when the PR is landed. |
jasnell commented Aug 1, 2018
Doh... Missed the step in landing. I used to have that in my local checks but I got rid of those when switching to node-core-util. Completely forgot about it. Will do a fixup pr |
ChALkeR commented Aug 1, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
jasnell commented Aug 1, 2018
It would be helpful if node-core-util could handle it :) |
jasnell commented Aug 1, 2018
Fixup here: #22062 |
jdalton commented Aug 1, 2018
This is the first step in a long process of deprecating `process.binding()` and replacing it with `internalBinding()`. Eventually, once we have replaced internal uses of `process.binding()` with `internalBinding()`, we can escalate to a runtime deprecation and eventual end-of-life. PR-URL: #22004 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Bryan English <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
This is the first step in a long process of deprecating
process.binding()and replacing it withinternalBinding().Eventually, once we have replaced internal uses of
process.binding()withinternalBinding(), we can escalateto a runtime deprecation and eventual end-of-life.
/cc @nodejs/tsc @nodejs/security-wg
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes