You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Track the upstream tree-sitter-cpp blockers that are causing tree-sitter-mozcpp to skip the test_fn_id_strings test and a set of
DeepSpeech 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-cpp release ships on
crates.io with one of these fixes.
Why we cannot fix this locally
tree-sitter-mozcpp is a thin overlay on top of tree-sitter-cpp. The
overlay (tree-sitter-mozcpp/grammar.js, ~378 lines) only adds
Mozilla-specific macro tokens such as MOZ_NONHEAP_CLASS. Every parse
failure in #83 comes from a structural defect in the underlying tree-sitter-cpp grammar — binary_expression, preproc_if, enumerator, etc. We cannot fix those rules in the overlay, and per AGENTS.md we cannot fork the vendored grammar or repoint tree-sitter-cpp at a git sha:
External grammar crates are version-pinned (=X.Y.Z) in the root Cargo.toml. Treat the pinned version as fixed: do not loosen pins
to a range without explicit user approval. Bumping a grammar version
is a deliberate, separate change.
The build pipeline reflects this — generate-grammars/generate-mozcpp.sh
reads the pin from tree-sitter-mozcpp/Cargo.toml and downloads the
matching crate from crates.io. There is no supported path to a git sha.
Six bugs and one feature request remain open upstream. One bug (#252) was
fixed on master in September 2025 but no tree-sitter-cpp release has
been 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)
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 #83