Repository navigation
track(grammar): tree-sitter-cpp blockers behind mozcpp/deepspeech skips (#83) #86
Description
Activity
- addedbugSomething isn't workingSomething isn't workingdependenciesPull requests that update a dependency filePull requests that update a dependency file
on May 3, 2026 Cross-reference: #718 now tracks switching the default C/C++ grammar from
the vendored mozcpp fork to upstreamtree-sitter-cpp =0.23.4(plus a new
upstream-tree-sitter-cLANG::C), with mozcpp demoted to an opt-in
feature.Two interactions with this tracker:
- The flip does not fix any of the seven upstream defects tracked
here — upstream 0.23.4 is exactly the base mozcpp inherits, so they
reproduce identically on both grammars. This issue stays open
regardless of track(lang): default C/C++ to upstream grammars, add C language, mozcpp opt-in #718's outcome. - After the flip, the watch-and-bump procedure here gets simpler for the
default path: bumpingtree-sitter-cppbecomes a plain pinned-version
bump + snapshot review, with the manualgenerate-mozcpp.sh
regeneration only needed for the opt-in mozcpp feature. chore(grammar): re-evaluate mozcpp-era skips, workarounds, and docs post-flip #723 will
re-attribute the fix(tests,mozcpp): tree-sitter-cpp parse failures skip mozcpp/deepspeech tests #83 skips (overlay artifact vs genuine upstream
defect) and update this tracker's body accordingly.
- The flip does not fix any of the seven upstream defects tracked
- addedlow-priorityLow-priority per issue-plan assessmentLow-priority per issue-plan assessment
on Aug 1, 2026 Added a resolution plan and assessment ratings (Difficulty: Low, Complexity: Low, Priority: Low), and applied
low-priority.Status refreshed 2026-07-31 using the issue's own script — nothing has moved. All six bugs still OPEN, #252 still CLOSED 2025-09-16, and the latest
tree-sitter-cpprelease is still v0.23.4 (2024-11-11). That is ~20 months with no release cut and ~10 months since the #252 fix landed onmasterunreleased. The table is accurate; the waiting has become the finding.(The crates.io
curlin the how-to-check block now returns nulls — it needs aUser-Agent. Thegh api releasescall still works.)Three stale facts in the body:
- The root pin line says
tree-sitter-mozcpp = "=0.20.4"; it is now{ package = "bca-tree-sitter-mozcpp", path = "./tree-sitter-mozcpp", version = "=2.1.0" }. - The root now pins upstream
tree-sitter-cppdirectly (Cargo.toml:70,=0.23.4), which it did not when this was filed — since refactor(api): normalize &LANG-by-value and drop Java-style get_ getter prefixes #507/refactor(lang): back Cpp with upstream tree-sitter-cpp, add mozcpp opt-in #720 that crate is the default C++ grammar. So a release would need bumping in two places; acceptance criterion 1 only mentionstree-sitter-mozcpp/Cargo.toml. - fix(tests,mozcpp): tree-sitter-cpp parse failures skip mozcpp/deepspeech tests #83 is already CLOSED, but the Related section says not to close it until the FIXMEs are removed, and
tests/deepspeech_test.rsstill carries a skip marker. Needs reconciling.
A pin that is not actually pinned.
tree-sitter-mozcpp/Cargo.toml:44readstree-sitter-cpp = "0.23.4"— a caret range, not the=0.23.4form AGENTS.md requires.Cargo.lockholds it, but a plaincargo updatewould move it silently, which is exactly the deliberate-change gate this issue exists to be. Same shape intree-sitter-mozjs(tree-sitter-javascript = "0.25.0") andtree-sitter-tcl(tree-sitter-language = "0.1.0").Main recommendation: stop watching manually. Every criterion is gated on "a new release ships", and nothing notices when it does — someone has to remember to run the script. Twenty months of silence is good evidence nobody will. The repo already has the pattern (
mutation-test.yml,benchmark.yml— quarterly cron +workflow_dispatch): agrammar-upstream-watch.ymlthat compares the newest upstream tag against the pin and comments here when it moves, plus re-querying the seven blockers since amasterfix is the leading indicator. That converts a watch issue into a triggered one.Also worth a polite upstream request for a release cut — #252 has been fixed and unreleased for ten months. #1058 is a second reason to open a conversation with that project; combine rather than filing twice.
- The root pin line says
Decision recorded: automate the watch, escalate upstream, reopen #83.
Status re-checked today: six blockers still OPEN, #252 still CLOSED-but-unreleased, newest release still v0.23.4 (2024-11-11) — ~20 months with no release, ~10 since #252's fix landed on
master.- Add
grammar-upstream-watch.ymlon the existing quarterly-cron pattern (mutation-test.yml/benchmark.yml): compare the newest upstream tag against the pin, comment here when it moves, and re-query the seven each run since amasterfix is the leading indicator. Every criterion here is gated on "a release ships" and nothing notices when it does; twenty months of silence is good evidence nobody will remember to check. - Open an upstream release request, combined with fix(tree-sitter-mozcpp): bound the deserialize memcpy in scanner.c #1058's scanner report rather than filed twice.
- fix(tests,mozcpp): tree-sitter-cpp parse failures skip mozcpp/deepspeech tests #83 reopened — it was closed while its FIXMEs are still in the tree and all seven blockers remain unresolved, contradicting both the Related note here and acceptance criterion 3.
Body corrections applied: the root pin line was stale; the root now pins upstream
tree-sitter-cppdirectly (Cargo.toml:70) since #507/#720 made it the default grammar, so acceptance criterion 1 must bump two places, not one; thecurlsnippet needs aUser-Agent; and the caret-range pin attree-sitter-mozcpp/Cargo.toml:44is tracked in #1151 — it is the path by which the bump this issue gates could happen accidentally.- Add
- added 2 commits that reference this issue
on Aug 23, 2026
Summary
Track the upstream
tree-sitter-cppblockers that are causingtree-sitter-mozcppto skip thetest_fn_id_stringstest and a set ofDeepSpeech files (see #83). The skips themselves are documented and have
correct FIXME references after #83. This issue exists so we have a single
place to record release / fix status for the seven upstream defects and
trigger a grammar bump when one of them becomes available.
This is a watch-and-bump issue, not a coding task. No code change is
expected unless / until a new
tree-sitter-cpprelease ships oncrates.io with one of these fixes.
Why we cannot fix this locally
tree-sitter-mozcppis a thin overlay on top oftree-sitter-cpp. Theoverlay (
tree-sitter-mozcpp/grammar.js, ~378 lines) only addsMozilla-specific macro tokens such as
MOZ_NONHEAP_CLASS. Every parsefailure in #83 comes from a structural defect in the underlying
tree-sitter-cppgrammar —binary_expression,preproc_if,enumerator, etc. We cannot fix those rules in the overlay, and perAGENTS.mdwe cannot fork the vendored grammar or repointtree-sitter-cppat a git sha:The build pipeline reflects this —
generate-grammars/generate-mozcpp.shreads the pin from
tree-sitter-mozcpp/Cargo.tomland downloads thematching crate from crates.io. There is no supported path to a git sha.
Status of the seven upstream defects
Current pins:
Cargo.toml:tree-sitter-mozcpp = "=0.20.4"tree-sitter-mozcpp/Cargo.toml:tree-sitter-cpp = "0.23.4"tree-sitter-cppmax_stable_version:0.23.4(2024-11-11)test_fn_id_stringsdeepspeech.cc,getopt_win.h,mmap.ccdeepspeech.hdeepspeech.hfast-dtoa.cc>=operator)left_test.ccfst_test.h(×2 openfst)4910efc)Six bugs and one feature request remain open upstream. One bug (#252) was
fixed on
masterin September 2025 but notree-sitter-cpprelease hasbeen cut since 2024-11-11 (v0.23.4), so the fix is unreachable through
crates.io today.
Acceptance criteria (any one of these unblocks an action)
tree-sitter-cpprelease on crates.io that includes the feat(lib): per-language Cargo features for grammar selection #252fix. When that ships:
tree-sitter-cppintree-sitter-mozcpp/Cargo.tomlto the newversion.
tree-sitter-mozcppmajor/minor in the rootCargo.toml../generate-grammars/generate-mozcpp.shand review the diff.fst_test.hentries from the exclusion list intests/deepspeech_test.rs.cargo insta test --reviewand accept the resulting snapshotdrift.
parses cleanly — if so, drop those exclusions too.
the same flow, dropping the corresponding entries.
FIXMEblocks and#[ignore]markers entirely (this is the acceptance criterion offix(tests,mozcpp): tree-sitter-cpp parse failures skip mozcpp/deepspeech tests #83), close fix(tests,mozcpp): tree-sitter-cpp parse failures skip mozcpp/deepspeech tests #83 and close this tracking issue.
How to check status quickly
Related
seven are resolved and the FIXMEs are removed)
tree-sitter-mozcpptest failures introduced by #1141 mozilla/rust-code-analysis#1142 — the upstream Mozilla ancestor of fix(tests,mozcpp): tree-sitter-cpp parse failures skip mozcpp/deepspeech tests #83Resolution Plan
Status refreshed 2026-07-31 — nothing has moved
Ran the issue's own status script:
>=operatorLatest
tree-sitter-cppGitHub release is still v0.23.4, 2024-11-11. Soas of today that is ~20 months with no release cut, and ~10 months
since the #252 fix landed on
masterunreleased. The table in the issue bodyis accurate; it is the waiting that has become the finding.
(The crates.io API call in the "how to check" block returns nulls now — it
needs a
User-Agentheader. Thegh api releasescall still works and is theone to keep.)
Three stale facts in the body
root Cargo.toml: tree-sitter-mozcpp = "=0.20.4". It is nowtree-sitter-mozcpp = { package = "bca-tree-sitter-mozcpp", path = "./tree-sitter-mozcpp", version = "=2.1.0" }— a path dependency on thevendored fork, renamed and re-versioned.
tree-sitter-cppdirectly —Cargo.toml:70,= "=0.23.4"— which it did not when this was filed.Since refactor(api): normalize &LANG-by-value and drop Java-style get_ getter prefixes #507 / refactor(lang): back Cpp with upstream tree-sitter-cpp, add mozcpp opt-in #720 that crate is the default C++ grammar and mozcpp is
opt-in. So a
tree-sitter-cpprelease would need bumping in two places,not one, and the acceptance-criteria checklist only mentions
tree-sitter-mozcpp/Cargo.toml.all seven are resolved and the FIXMEs are removed", and acceptance criterion
3 says to close it as part of the final cleanup.
tests/deepspeech_test.rsstill carries a skip marker, so the FIXMEs were not removed. Reconcile:
either reopen fix(tests,mozcpp): tree-sitter-cpp parse failures skip mozcpp/deepspeech tests #83, or drop it from criterion 3 and note that the skip
tracking now lives here.
A pin that is not actually pinned
tree-sitter-mozcpp/Cargo.toml:44readstree-sitter-cpp = "0.23.4"— acaret range, not the
=0.23.4formAGENTS.mdrequires for external grammarcrates.
Cargo.lockis committed, so it is held in practice, but a plaincargo updatewould silently move it to any 0.23.x that ships — which isprecisely the "deliberate, separate change" this issue exists to gate.
Two siblings have the same shape:
tree-sitter-mozjs/Cargo.toml:46(
tree-sitter-javascript = "0.25.0") andtree-sitter-tcl/Cargo.toml:43(
tree-sitter-language = "0.1.0"). Worth tightening all three to=in onesmall change — it is independent of any upstream movement and closes the path
by which this bump could happen accidentally rather than deliberately.
The real recommendation: stop watching manually
Every acceptance criterion here is gated on "a new release ships", the issue
has been open on that basis for a long time, and there is no mechanism that
notices when it happens — someone has to remember to run the script. Twenty
months of no release is strong evidence that nobody will.
This repository already has the pattern:
mutation-test.ymlandbenchmark.ymlare quarterly crons withworkflow_dispatch. Addgrammar-upstream-watch.ymlon the same shape:gh api repos/tree-sitter/tree-sitter-cpp/releasesfor the newest tag.tree-sitter-mozcpp/Cargo.toml.gh issue commenton this issue with the new version and thecurrent state of the seven blockers.
masteris the leading indicator.That converts a watch issue into a triggered one and is the single change that
makes the rest of this plan actionable rather than aspirational. Extend it to
the other pinned grammars while you are there — the same staleness applies to
every
=X.Y.Zin the root manifest.Consider escalating upstream
Separately, and cheaply: #252's fix has sat unreleased for ten months. A
polite request on the
tree-sitter-cpprepository for a release cut isreasonable and costs nothing. #1058 is a second reason to open a conversation
with that project — worth combining rather than filing twice.
Steps
=.User-Agent) or drop it in favour of thegh apione.grammar-upstream-watch.yml.tree-sitter-mozcpp/Cargo.tomland rootCargo.toml:70) to acceptance criterion 1.Assessment
Difficulty — Low. Body edits, three one-character manifest changes, and a
cron workflow modelled on two that already exist. The grammar bump itself, if
a release ever ships, would be Medium — snapshot drift across the C++ corpus —
but that is not this issue's work; the criteria already describe it.
Complexity — Low. No source code, no metric computation, no public API.
The workflow addition needs
make actionlintperAGENTS.md, which is theonly gate it touches.
Priority — Low. This is a watch-and-bump tracker by its own description,
and everything it tracks is blocked on a third party that has not cut a release
in twenty months. Nothing here is broken, the skips are documented with correct
references, and the affected grammar is the opt-in one. The automation in step
4 is the part worth doing soon — not because the outcome is urgent, but because
without it this issue's whole purpose depends on someone remembering.
low-priorityapplied: Priority is Low.Decision (2026-07-31)
Automate the watch, escalate upstream, and reopen #83.
Status re-checked today with the script above: all six bugs still OPEN, #252
still CLOSED-but-unreleased, and the newest
tree-sitter-cpprelease is stillv0.23.4 (2024-11-11) — roughly twenty months with no release cut, ten
months since #252's fix landed on
master. Three actions follow.Add
grammar-upstream-watch.yml. Every acceptance criterion here isgated on "a new release ships", and nothing notices when it does — someone
has to remember to run the script. Twenty months of silence is good evidence
nobody will. Model it on the existing quarterly crons
(
mutation-test.yml,benchmark.yml:schedule:plusworkflow_dispatch):compare the newest upstream tag against the pin parsed from
tree-sitter-mozcpp/Cargo.toml,gh issue commenthere when it moves, andre-query the seven blockers each run since a
masterfix is the leadingindicator. Extend to the other pinned grammars while there.
make actionlintis required for any workflow edit.
Open an upstream release request. feat(lib): per-language Cargo features for grammar selection #252's fix has been unreleased for ten
months; asking for a release cut is reasonable and costs nothing. fix(tree-sitter-mozcpp): bound the deserialize memcpy in scanner.c #1058
is a second reason to open a conversation with that project (an unbounded
memcpyinsrc/scanner.c, byte-identical in 0.23.4) — combine the tworather than filing twice.
fix(tests,mozcpp): tree-sitter-cpp parse failures skip mozcpp/deepspeech tests #83 is reopened. It was closed while its FIXMEs are still in the tree
and all seven blockers remain unresolved, contradicting both the Related
note here and acceptance criterion 3.
Body corrections applied by this decision
tree-sitter-mozcpp = { package = "bca-tree-sitter-mozcpp", path = "./tree-sitter-mozcpp", version = "=2.1.0" },a path dependency on the vendored fork.
tree-sitter-cppdirectly (Cargo.toml:70,="0.23.4"), which it did not when this was filed — since refactor(api): normalize &LANG-by-value and drop Java-style get_ getter prefixes #507 / refactor(lang): back Cpp with upstream tree-sitter-cpp, add mozcpp opt-in #720 thatcrate is the default C++ grammar. Acceptance criterion 1 must bump two
places, not one.
curlsnippet returns nulls without aUser-Agentheader; thegh api .../releasescall is the one to rely on.tree-sitter-mozcpp/Cargo.toml:44(
tree-sitter-cpp = "0.23.4", not="0.23.4") is tracked in chore(grammars): three vendored manifests use caret ranges instead of = pins #1151 — itis the path by which the bump this issue gates could happen accidentally.
The seven blockers' status table and the acceptance criteria are otherwise
correct and unchanged.