GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — doc: documentation deprecation of process.binding by jasnell · Pull Request #22004 · nodejs/node Conversation
Member
This is the first step in a long process of deprecating Eventually, once we have replaced internal uses of /cc @nodejs/tsc @nodejs/security-wg Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
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.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
gireeshpunathil
approved these changes
mcollina
approved these changes
Member
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. LGTM
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
cjihrig
approved these changes
vdeturckheim
approved these changes
addaleax
approved these changes
bengl
approved these changes
vsemozhetbyt
approved these changes
sagirk
approved these changes
devsnek
approved these changes
Trott
reviewed
|
|
|
||
| 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.
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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| Type: Documentation-only | ||
|
|
||
| The `process.binding()` API is intended for use strictly by Node.js internal |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nit: remove strictly
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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):
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'd be great to make some things, like |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@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! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM with @Trott comments addressed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI-Lite: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/375/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Will land this on Monday if there are no objections by then. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| Type: Documentation-only | ||
|
|
||
| The `process.binding()` API is intended for use by Node.js internal only |
There was a problem 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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
What about DEP0103? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ah, right, yeah I'll update the description for that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CI Pipeline: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/391/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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]>
|
Landed in 182051b |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jasnell Is it supposed to include the deprecation codes as |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The deprecation number should be assigned when the PR is landed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@targos @jasnell Apparently, that doesn't work :-/. As the space of deprecation codes is pretty high, perhaps we could assign codes at PR open time instead and add a test for those? Would holes or out-of-order landing of deprecation codes hurt? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It would be helpful if node-core-util could handle it :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Fixup here: #22062 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Opened #22064 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.