Plan of process.binding() deprecation
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- backend
調査の方向性
まず、参照されている Node.js の pull request と、最終状態の動作、binding のロールアウト、代替案、警告のタイミングに関する質問を確認します。TSC がこれらの質問を解決し、合意された deprecation plan を文書化すれば完了です。実装ファイルやテストは指定されていません。
索引モデルが issue の本文から書いたものです。
説明
This issue is not new but motivated by https://github.com/nodejs/node/pull/50687, which proposed to
- Ship the runtime deprecation in Node.js v22 --deprecated-process-binding on by default.
- --no-deprecated-process-binding becomes the default in Node.js v23
- process.binding(...) is removed entirely in Node.js v24, with the CLI option becoming a no-op
For background in 2021 the plan suggested in https://github.com/nodejs/node/pull/37485#pullrequestreview-600060802 and followed since https://github.com/nodejs/node/pull/37819 was:
- Do comprehensive research into what exact features ecosystem modules get through process.binding() (this isn't actually going to be a huge API surface!)
- Patch process.binding() so that it returns objects that cover those use cases, implemented in terms of public APIs
- Optionally, runtime-deprecate process.binding() only for the cases that users aren't commonly encountering
- Eventually, remove support for those cases specifically
- Leave it at that, don't runtime-deprecate process.binding() as a whole and leave the shim in place forever
I am opening this issue trying to slice the issue into different questions instead of bundling all together into just two different plans, in the hope of figuring out a better compromise.
There are several questions to the deprecation of process.binding():
- What's our end-goal when the deprecation reaches EOL?
a) Deleteprocess.bindingcompletely so that when trying to invoke it, users get an error.
b) A function that does no more than emitting a warning and returning empty objects. Users almost always get an error when they try to access an unsupported property, but if the code path is unused, e.g. only loading aprocess.binding()from the top-level but never actually hit the code path using anything from it, it would not fail.
c) Leave a low-maintenance and harmless shim in place forever. Users get an error only when they try to use a specific unsupported property. - How should the list of bindings (currently 20) be deprecated?
a) Individually, based on how problematic they are/how difficult it is to provide alternatives
b) Together at once - Should the runtime deprecation start before or after alternatives/shims are completed
a) We investigate the impact (e.g. through CITGM), develop and release alternatives on the way, monitor the changes in the impact, before deciding when it's ready to runtime-deprecate it (individually or all together).
b) Runtime-deprecate it directly and mitigate the impact afterwards based on the bug reports/feature requests we receive. - How should the warnings be rolled out when we start to emit warnings (there are a few more combination possibilities with 2)
a) Emit runtime warnings unconditionally
c) Non-node_module warnings first, node_module warnings in the next cycle
I think we as @nodejs/tsc need to take a deeper look into these questions and make some decisions before finishing a plan of the deprecation.
- 主要言語
- JavaScript
- スター
- 693
- フォーク
- 142
- 平均マージ
- 8日 7時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nodejs/TSC のほかの issue
-
GSoC 2027オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 1/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
-
tsc-agenda
難易度 5/5 1週間以上 初心者へのやさしさ 8/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 3/100
似ている issue
-
【错误报告】界限突破·于吉「蛊惑」结算崩溃:reguhuo_final 中 chooseToDiscard().forResult() 可能返回 undefined(result.bool 未判空)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
ai-driven-fuzzing bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
linagora/twake-drive#4494 ·
メンテナーはふだん 1 日以内に返信
-
[quality] /resources/metrics draws the single-point member-companies chart on the left axis対応中かも @hivecommons-hive が今日担当しました。 オープンagent/quality stage/040-covered-by-pr testing
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
Difficulty: Easy Good First Issue Help Wanted javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rubyforgood/casa#7311 ·
メンテナーはふだん 1 日以内に返信