The IDENTIFIERS list in Tools/scripts/generate_global_objects.py is a slight burden
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
(This is partly inspired by gh-94706.)
In generate_global_objects.py, iter_global_strings() detects global strings by looking for _Py_ID() and _Py_DECLARE_STR() in the C source files. In some places those macros are used indirectly, which means the corresponding strings won't be detected by iter_global_strings().
Currently we manually add such strings to the IDENTIFIERS list at the top of the script. Before we added the discovery mechanism in iter_global_strings(), basically all the static strings were in this list. However, we found that there were several maintenance/development downsides to the manual list, so we added iter_global_strings(). At the time we didn't take the extra step of automating discovery of indirectly used names. We should address this.
CC @kumaraditya303
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Tools/scripts/generate_global_objects.py から始め、iter_global_strings() と手動で管理されている IDENTIFIERS リストに焦点を当てます。スクリプトが C ソースファイルを走査して _Py_ID() と _Py_DECLARE_STR() を検索する方法を追跡し、間接的に使用されている名前を発見する方法を特定します。間接的に使用されているグローバル文字列に手動で追加する必要がなくなり、生成が引き続き正しく行われれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, python
- 領域
- build-system, tooling
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100