GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: documentation deprecation of process.binding by jasnell · Pull Request #22004 · nodejs/node

Conversation

@jasnell

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ChALkeR, vkurchatkin, and andreis reacted with thumbs up emoji ChALkeR, antsmartian, BridgeAR, and andreis reacted with hooray emoji
All reactions
  • 👍 3 reactions
  • 🎉 4 reactions
@jasnell
doc: documentation deprecation of process.binding
4a1fef2
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

nodejs-github-bot commented Jul 27, 2018

Copy link
Copy Markdown
Collaborator

@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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added deprecations Issues and PRs related to deprecations. doc Issues and PRs related to Node.js documentation. labels Jul 27, 2018
gireeshpunathil
gireeshpunathil approved these changes Jul 27, 2018
View reviewed changes
mcollina
mcollina approved these changes Jul 27, 2018
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cjihrig
cjihrig approved these changes Jul 27, 2018
View reviewed changes
vdeturckheim
vdeturckheim approved these changes Jul 27, 2018
View reviewed changes
addaleax
addaleax approved these changes Jul 27, 2018
View reviewed changes
bengl
bengl approved these changes Jul 27, 2018
View reviewed changes
vsemozhetbyt
vsemozhetbyt approved these changes Jul 27, 2018
View reviewed changes
@addaleax addaleax added the process Issues and PRs related to the process subsystem. label Jul 27, 2018
sagirk
sagirk approved these changes Jul 27, 2018
View reviewed changes
devsnek
devsnek approved these changes Jul 27, 2018
View reviewed changes
Trott
Trott reviewed Jul 27, 2018
View reviewed changes
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 Trott Jul 27, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Trott Trott Jul 27, 2018

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Trott
Trott reviewed Jul 27, 2018
View reviewed changes
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.

@Trott Trott Jul 27, 2018

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gibfahn, sagirk, and BridgeAR reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
Trott
Trott reviewed Jul 27, 2018
View reviewed changes
Comment thread doc/api/deprecations.md Outdated

Type: Documentation-only

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

@Trott Trott Jul 27, 2018

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ChALkeR ChALkeR Jul 27, 2018

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Trott Trott Jul 27, 2018

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Trott Trott Jul 27, 2018

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ChALkeR, gibfahn, sagirk, and BridgeAR reacted with thumbs up emoji
All reactions
  • 👍 4 reactions
@Trott

Trott commented Jul 27, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ChALkeR
ChALkeR approved these changes Jul 27, 2018
View reviewed changes

@ChALkeR ChALkeR left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ChALkeR

ChALkeR commented Jul 27, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jdalton

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina

mcollina commented Jul 28, 2018

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!

ChALkeR, jdalton, and BridgeAR reacted with thumbs up emoji
All reactions
  • 👍 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

BridgeAR
BridgeAR approved these changes Jul 29, 2018
View reviewed changes
tniessen
tniessen approved these changes Jul 29, 2018
View reviewed changes
targos
targos approved these changes Jul 29, 2018
View reviewed changes

@targos targos left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mhdawson
mhdawson approved these changes Jul 29, 2018
View reviewed changes

@mhdawson mhdawson left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jasnell
[Squash] Nits
6688e01
@jasnell

jasnell commented Jul 29, 2018

Copy link
Copy Markdown
Member Author

CI-Lite: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/375/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Jul 29, 2018

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Type: Documentation-only

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

@Trott Trott Jul 29, 2018

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

fixed the word ordering

@ChALkeR

ChALkeR commented Jul 29, 2018

Copy link
Copy Markdown
Member

What about DEP0103?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Jul 29, 2018

Copy link
Copy Markdown
Member Author

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

ChALkeR reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell
[Squash] Add note to DEP0103
dd83b73
@jasnell

jasnell commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

CI Pipeline: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/391/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell added a commit that referenced this pull request Aug 1, 2018
@jasnell
doc: documentation deprecation of process.binding
182051b
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

jasnell commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

Landed in 182051b

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell jasnell closed this Aug 1, 2018
@ChALkeR

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Aug 1, 2018

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChALkeR

ChALkeR commented Aug 1, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell jasnell mentioned this pull request Aug 1, 2018
doc: fixup process.binding deprecation code #22062
Closed
3 tasks done
@jasnell

jasnell commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

Fixup here: #22062

ChALkeR reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jdalton jdalton mentioned this pull request Aug 1, 2018
Migration from process.binding #22064
Closed
@jdalton

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

ChALkeR reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott 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
@jasnell @targos
doc: documentation deprecation of process.binding
ec9d529
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]>
@rvagg rvagg mentioned this pull request Aug 13, 2018
Release proposal: v10.9.0 #22295
Merged
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#230
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#215
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#231
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#216
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#232
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#217
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#233
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#218
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#234
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#219
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ChALkeR ChALkeR ChALkeR approved these changes
@mcollina mcollina mcollina approved these changes
@bengl bengl bengl approved these changes
@addaleax addaleax addaleax approved these changes
@cjihrig cjihrig cjihrig approved these changes
@tniessen tniessen tniessen approved these changes
@gireeshpunathil gireeshpunathil gireeshpunathil approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes
@Trott Trott Trott left review comments
+6 more reviewers
@targos targos targos approved these changes
@sagirk sagirk sagirk approved these changes
@devsnek devsnek devsnek approved these changes
@vdeturckheim vdeturckheim vdeturckheim approved these changes
@mhdawson mhdawson mhdawson approved these changes
@vsemozhetbyt vsemozhetbyt vsemozhetbyt approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

18 participants

@jasnell @nodejs-github-bot @Trott @ChALkeR @jdalton @mcollina @targos @bengl @addaleax @cjihrig @sagirk @tniessen @devsnek @gireeshpunathil @vdeturckheim @BridgeAR @mhdawson @vsemozhetbyt
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.