| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS 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.
|
@jasnell build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/368/pipeline |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| 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.
It might be best to avoid the possessive by removing a couple words so it becomes: bridge between JavaScript and native code.
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
|
|
||
| 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.
AFAIK, we use userland everywhere and user-land nowhere, so let's stick with userland.
Sorry, something went wrong.
|
|
||
| Type: Documentation-only | ||
|
|
||
| The `process.binding()` API is intended for use strictly by Node.js internal |
There was a problem hiding this comment.
Nit: remove strictly
Sorry, something went wrong.
There was a problem hiding this comment.
Why?
Sorry, something went wrong.
There was a problem hiding this comment.
It's unnecessary. It's also imprecise. "only" would be more precise.
Sorry, something went wrong.
There was a problem hiding this comment.
So maybe this?:
process.binding() is intended for use by Node.js internal code only.
Sorry, something went wrong.
|
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 a problem hiding this comment.
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.
|
@jasnell Perhaps DEP0103 text should be updated (in the «should be avoided» part) to mention this deprecation? |
Sorry, something went wrong.
|
I'd be great to make some things, like process.binding('config'), accessible in a more user-friendly way. As we move thing along we should try to examine what folks have found handy (to cause them to reach for these internals) and try to fill the feature gap in a more polished way. |
Sorry, something went wrong.
|
@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 a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
|
Will land this on Monday if there are no objections by then. |
Sorry, something went wrong.
|
|
||
| Type: Documentation-only | ||
|
|
||
| The `process.binding()` API is intended for use by Node.js internal only |
There was a problem hiding this comment.
by Node.js internal only code -> by Node.js internal code only or only by Node.js internal code.
Sorry, something went wrong.
|
What about DEP0103? |
Sorry, something went wrong.
|
Ah, right, yeah I'll update the description for that |
Sorry, something went wrong.
Sorry, something went wrong.
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 <gpunathi@in.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
@jasnell Is it supposed to include the deprecation codes as DEP00XX? |
Sorry, something went wrong.
|
The deprecation number should be assigned when the PR is landed. |
Sorry, something went wrong.
|
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.
|
@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.
|
It would be helpful if node-core-util could handle it :) |
Sorry, something went wrong.
Opened #22064 |
Sorry, something went wrong.
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 <gpunathi@in.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
| Back | FazBrowse Home | New Git URL |
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.
/cc @nodejs/tsc @nodejs/security-wg
Checklist