docs(stability): say where Node's four plain flag accessors stand
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- markdown, rust
- Domain
- documentation
Research direction
Start with the “Escape hatches” section in STABILITY.md and compare its accessor list and exclusion sentence with the four methods named in the issue. Read the related context in big-code-analysis-book/src/library/ast-traversal.md and the #1871 changelog entry. Update the stability wording to reflect the chosen policy; done when it states why these accessors are covered or excluded without implying every uncovered method needs an unexported type.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Rust
- Stars
- 32
- Forks
- 3
- Avg merge
- 9h 55m
- Merged PRs (30d)
- 102
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dekobon/big-code-analysis
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dekobon/big-code-analysis#1887 ·
Maintainers usually reply within 1 day
-
low-priority performance
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dekobon/big-code-analysis#1879 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dekobon/big-code-analysis#1458 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
dekobon/big-code-analysis#1444 ·
Maintainers usually reply within 1 day
-
security upstream-grammar
Difficulty 2/5 Under an hour Newbie friendliness 75/100
dekobon/big-code-analysis#1058 · 3 comments ·
Maintainers usually reply within 1 day
All issues in dekobon/big-code-analysis
Similar issues
-
area:schema documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ElectronicWave/Elemental#252 ·
Maintainers usually reply within 1 day
-
Shell中文符号输入异常Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area:mcp effort:low P5 source:agent
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day