FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: documentation deprecation of process.binding by jasnell · Pull Request #22004 · nodejs/node · GitHub

/ node Public

doc: documentation deprecation of process.binding - #22004

Closed
jasnell wants to merge 4 commits into
nodejs:masterfrom
jasnell:docs-deprecate-process-binding
Closed

doc: documentation deprecation of process.binding#22004
jasnell wants to merge 4 commits into
nodejs:masterfrom
jasnell:docs-deprecate-process-binding

Conversation

jasnell commented Jul 27, 2018

Copy link
Copy Markdown
Member

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
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

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.

Copy link
Copy Markdown
Collaborator

nodejs-github-bot added deprecations Issues and PRs related to deprecations. doc Issues and PRs related to the documentations. labels Jul 27, 2018

mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

addaleax added the process Issues and PRs related to the process subsystem. label Jul 27, 2018
Comment thread 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.

Trott Jul 27, 2018
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It might be best to avoid the possessive by removing a couple words so it becomes: bridge between JavaScript and native code.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Comment thread 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

AFAIK, we use userland everywhere and user-land nowhere, so let's stick with userland.

Comment thread doc/api/deprecations.md Outdated

Type: Documentation-only

The `process.binding()` API is intended for use strictly by Node.js internal

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nit: remove strictly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's unnecessary. It's also imprecise. "only" would be more precise.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

So maybe this?:

process.binding() is intended for use by Node.js internal code only.

Trott commented Jul 27, 2018
edited
Loading

Copy link
Copy Markdown
Member

Putting all my nits together (and one or two that I didn't leave), the wording might be simplified to:

process.binding() is intended for use by Node.js internal code. Use in
userland code is unsupported.

...or (adding one word more):

process.binding() is intended for use by Node.js internal code only. Use in
userland code is unsupported.

ChALkeR left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Member

@jasnell Perhaps DEP0103 text should be updated (in the «should be avoided» part) to mention this deprecation?

jdalton commented Jul 28, 2018

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

@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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM with @Trott comments addressed

mhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

jasnell commented Jul 29, 2018

Copy link
Copy Markdown
Member Author

jasnell commented Jul 29, 2018

Copy link
Copy Markdown
Member Author

Will land this on Monday if there are no objections by then.

Trott previously requested changes Jul 29, 2018
Comment thread doc/api/deprecations.md Outdated

Type: Documentation-only

The `process.binding()` API is intended for use by Node.js internal only

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

by Node.js internal only code -> by Node.js internal code only or only by Node.js internal code.

Trott dismissed their stale review July 29, 2018 19:54

fixed the word ordering

ChALkeR commented Jul 29, 2018

Copy link
Copy Markdown
Member

What about DEP0103?

jasnell commented Jul 29, 2018

Copy link
Copy Markdown
Member Author

Ah, right, yeah I'll update the description for that

jasnell commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

jasnell added a commit that referenced this pull request 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 <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 commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

Landed in 182051b

jasnell closed this Aug 1, 2018

ChALkeR commented Aug 1, 2018

Copy link
Copy Markdown
Member

@jasnell Is it supposed to include the deprecation codes as DEP00XX?
Are those assigned at the time of a release, or was that not deliberate?

targos commented Aug 1, 2018

Copy link
Copy Markdown
Member

The deprecation number should be assigned when the PR is landed.

jasnell commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member

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

jasnell commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

It would be helpful if node-core-util could handle it :)

jasnell commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

Fixup here: #22062

jdalton commented Aug 1, 2018

Copy link
Copy Markdown
Member

@mcollina

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!

Opened #22064

Trott added the notable-change PRs with changes that should be highlighted in changelogs. label Aug 1, 2018
targos pushed a commit that referenced this pull request 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 <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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecations Issues and PRs related to deprecations. doc Issues and PRs related to the documentations. notable-change PRs with changes that should be highlighted in changelogs. process Issues and PRs related to the process subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.


Back | FazBrowse Home | New Git URL