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 — process: wrap process.binding for selective fallthrough to internalBinding by jasnell · Pull Request #22269 · nodejs/node Conversation
|
|
@jasnell build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/520/pipeline |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 DeprecationWarning
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.
Nice, thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
actually @jasnell can you switch this to use SafeSet from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1503 |
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.
CITGM run has yargs looking okay, with docs added this looks good
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (!internalBindingWarned.has(name)) { | ||
| process.emitWarning( | ||
| `Use of process.binding('${name}') is deprecated.`, | ||
| 'DeprecationWarning', 'DEP0111'); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you add docs in doc/api/deprecations.md
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.
also it should be DEP00XX
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.
This is part of the existing DEP0111 process.binding deprecation. The documentation is already there. The odd but is that it's not a complete switch to a runtime deprecation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // Deprecated specific process.binding() modules, but not all, allow | ||
| // selective fallback to internalBinding for the deprecated ones. | ||
| const processBinding = process.binding; | ||
| const internalBindingWhitelist = new Set(['uv']); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
please use SafeSet
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.
Done
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.
I'd like to hold this until an allow list, and those items in it, are more thoroughly digested. Many of the APIs that are deprecated have no user-land alternatives so leaves devs with nothing to fill the functionality gap. I think before a runtime error can be thrown we should have alternatives or guidance for the various APIs.
Update:
The move from process.binding to internalBinding is good. The mapping in process.binding to internalBinding, included in this PR, is good too (needed for a deprecation and migration path).
Update:
See additional comments, here and here, on migration and deprecation of recently removed bindings in master branch.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jdalton ... this is not adding a runtime error. It adds a runtime deprecation for 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.
The var name is a bit confusing as it suggests an allow list but then it issues a warning (Deprecation warnings can throw). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
They throw only if Either way, we need to fix the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jasnell would it be possible to update per @devsnek's comment, and then to try and fast track this? Without a green CITGM (via this PR) we can't test the other binding removal PRs for regressions |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We can't fast track a semver-major with a red x. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I'm a fan of removing reliance on
I'll update my ✖️ above with this note |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@jdalton we only need to deprecate the ones with ecosystem usage. (like no one is using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Data is great for this! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Unblocking and landing this specific PR gives us a way of actually deprecating these things incrementally. |
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 I 👍 the approach of your previous comment.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There is no need for all. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Cool. You can address specifics in the follow-up commits in this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Removed the deprecation warning. Will handle that in a separate PR. Did not add the additional modules into the whitelist, prefer that to be done as separate PRs based on need. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This doesn't really satisfy the request. It's reasonable to add non-experimental bindings to the list until we can determine if they can safely be removed with data. I'm not a fan of a break-first-then-follow-up process. I dig the doc deprecate -> runtime warn -> then drop process. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please let me know which transitioned items you want to see landed... So far we've transitioned:
The other modules are handled by still open PRs that would need to be updated after this lands. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't think we have data on usage yet so if the bindings aren't experimental they should be added to the allow-list until then (so |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ah nice! Ok then! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
CI (with lints fixed): https://ci.nodejs.org/job/node-test-pull-request/16453/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Selectively fallthrough `process.binding()` to `internalBinding()` Refs: #22163 PR-URL: #22269 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
|
Landed in 0257fd7 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.