docs(stability): say where Node's four plain flag accessors stand
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- markdown, rust
調査の方向性
STABILITY.md の “Escape hatches” セクションから始め、アクセサーの一覧と除外についての文を、issue で挙げられている 4 つのメソッドと比較してください。big-code-analysis-book/src/library/ast-traversal.md の関連する文脈と、#1871 の changelog エントリーを読んでください。選択したポリシーを反映するように安定性に関する文言を更新してください。これらのアクセサーが対象となる、または除外される理由を明記し、対象外のすべてのメソッドに非公開の型が必要だと示唆しない内容になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
STABILITY.md gives a reason for leaving some Node methods out of the shape contract that does not fit four of them: has_error, is_error, is_missing and, since #1871, is_extra.
What the text says
The "Escape hatches" section lists the Node accessors whose signatures are shape-stable within 2.x: kind, kind_id, id, is_named, utf8_text, the position accessors, child, child_count, child_by_field_name, children, children_with, cursor, parent and previous_sibling. It then says:
Node's remaining methods, theSearchwalk helpers and the ancestor-chain-takinghas_sibling/count_specific_ancestors/parent_grandparent_match, are deliberately not covered. They nameSearch,AncestorsandChecker, which this crate does not re-export, so they are not callable frombig-code-analysisalone
Why it does not fit
has_error, is_error, is_missing and is_extra name none of Search, Ancestors or Checker. They are plain accessors, callable from big-code-analysis alone, and the book documents two of them (big-code-analysis-book/src/library/ast-traversal.md, which also says that anything on Node outside the list is not shape-stable). So they are outside the list for a reason the document does not state.
The Node::is_extra() changelog entry (#1871) says it is outside the list, as its neighbours are, and makes no new commitment.
Decision needed
One of:
- Add the four to the list. Their signatures are
fn(&self) -> bool, and their values already follow the tree-sitter pin as the listed accessors' do. This is a new stability commitment. - Keep them out, and say so plainly: name them in the "not covered" sentence with the real reason.
Either way the sentence quoted above should stop implying that every uncovered method needs an un-exported type.
Related
#1871, #1376.
- 主要言語
- Rust
- スター
- 32
- フォーク
- 3
- 平均マージ
- 9時間 55分
- マージ済み PR(30日)
- 102
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dekobon/big-code-analysis のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dekobon/big-code-analysis#1887 ·
メンテナーはふだん 1 日以内に返信
-
low-priority performance
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dekobon/big-code-analysis#1879 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
dekobon/big-code-analysis#1458 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
dekobon/big-code-analysis#1444 ·
メンテナーはふだん 1 日以内に返信
-
security upstream-grammar
難易度 2/5 1時間未満 初心者へのやさしさ 75/100
dekobon/big-code-analysis#1058 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
dekobon/big-code-analysis の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ElectronicWave/Elemental#252 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
area:mcp effort:low P5 source:agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jlcodes99/cockpit-tools#3103 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
eliasstravik/herdr-projects#1032 ·