NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Go modules, #2482 by repository stars
Latest stable
v0.57.0
Last release 13 days ago
09 Nov 2026
Ships on a steady schedule
a new release about every 8 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
9 months old
1138 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
v0.26.0 improves parser memory retention, result-ranking overhead, and extension-registry lifecycle safety.
v0.26.0 improves parser memory retention, result-ranking overhead, and extension-registry lifecycle safety.
Node from 144 to 104 bytes.
ArenaBreakdown now reports their allocation separately.Full changelog: https://github.com/odvcencio/gotreesitter/compare/v0.25.0...v0.26.0
Parser-memory, registry-lifecycle, and build-hygiene release following v0.25.0.
It shrinks common node state, removes a per-parse ranking memo, and stops
returned trees from retaining parser-only shape overflow. This minor release
adds an exported diagnostic field; callers using positional ArenaBreakdown
literals must update them.
ArenaBreakdown.NodeFieldMetadataBytesAllocated reports storage used by
arena-backed node field metadata.ParseFilePooled replaces a cached parser pool when a same-name registry
update supplies a different language instance.Node from 144 to 104 bytes and removes
245,966,616 bytes from the exact Poppler arena allocation while preserving
exact structural parity.Your coding agent can read these notes before it upgrades. Set up the MCP server →
One column per month.
Nothing published for this version
Nothing published for this version
Nothing published for this version
v0.25.0 banks the first post-correctness performance and repository-hygiene tranche.
v0.25.0 banks the first post-correctness performance and repository-hygiene tranche.
Highlights:
Compatibility note: This minor release intentionally removes the exported zero-only ReduceChildNoAlias and related ArenaBreakdown and PerfCounters fields. They had no production producer and always reported zero.
Still open: Poppler remains 3.50x C, and JavaScript remains pending on throughput. Profiling identifies rejected full-node construction as the next memory lever; the existing pending/transient coexistence modes are not suitable replacements.
Performance, memory, and runtime-hygiene release following v0.24.1. It makes pending-parent field metadata compact and exact, removes retired zero-only telemetry, and narrows redundant Java retry passes behind an exact-blob profile. This minor release intentionally includes the exported diagnostic telemetry removals listed below. It also re-certifies the exact Poppler witness inside a hard 2 GiB envelope without claiming that JavaScript's throughput tail is closed.
no_alias reduction-attribution lane from
ParseRuntime, ArenaBreakdown, PerfCounters, and the Java/Python and
parse-gap reports. The path has had no production producer since reductions
moved to all_visible or scratch_no_alias; every exposed value was
permanently zero.Nothing published for this version
Correct full-parse benchmark contract by @odvcencio in https://github.com/odvcencio/gotreesitter/pull/224
Full Changelog: https://github.com/odvcencio/gotreesitter/compare/v0.24.0...v0.24.1
Performance-contract and repository-hygiene follow-up to v0.24.0. This patch corrects the canonical full-parse benchmark before the long-tail optimization campaign continues, banks focused Caddy and Kotlin wins with fail-closed certification, and deletes superseded conflict and profiling machinery. It does not change the v0.24.0 Poppler memory claim or declare the remaining fleet performance tail closed.
cmd/ts2go now accepts non-terminal aliases from the grammar's alias-symbol
range instead of incorrectly rejecting every alias ID above SymbolCount.BenchmarkGoParseFullDFA now exercises the public Parser.Parse path and a
fully materialized tree. The former implementation silently enabled the
no-tree diagnostic and was mislabeled as a full parse.ParseNoResultCompatibilityBenchmarkOnly no longer implicitly enables the
no-tree path. Its result is materialized, so parse_gap_report can separate
no-tree parser-core cost from the broader no-compat diagnostic. Some
large-input diagnostic materialization strategies still key off this mode,
so it is not yet a pure compatibility-only A/B.BenchmarkGoParseCoreDFA lane and withdrew
the older generated-Go full-parse headline pending a pinned quiet-host rerun
of the corrected public benchmark.parse_gap_report, the retained shape
harness, and standard Go profiles.Nothing published for this version
fix(parser): re-lex JavaScript zero-width externals per GLR version by @odvcencio in https://github.com/odvcencio/gotreesitter/pull/220
Full Changelog: https://github.com/odvcencio/gotreesitter/compare/v0.23.1...v0.24.0
JavaScript large-file parity and parser memory-economy release. With an explicit 2 GiB parser budget, the 3,447,275-byte Poppler witness now reaches exact EOF with no error and exact structural parity. Its allocation and arena-capacity reductions reproduced in a same-day base/head audit, and a separate single-pass runtime gate completes inside a hard 2 GiB container. JavaScript's broader focused gate is 25/25 no-error, S-expression, and deep parity. The shipped 512 MiB Poppler budget gap remains open and tracked in the performance ledger.
GOT_TRANSIENT_REDUCE_CHECKPOINT_MB path that materializes the
live linear stack and reuses transient slabs once a configured threshold is
crossed.Node, rawShape, and rawShapeChild layouts remove alignment waste and
pack raw-shape edge metadata, shrinking the records from 152 to 144 bytes,
32 to 24 bytes, and 24 to 16 bytes respectively.Parser so attribution adds no
steady-state parser-core allocation. The v0.24.0 978 B/5 allocs sample
used the then-mislabeled no-tree benchmark and is not a full-parse allocation
claim; both incremental lanes remained at zero allocation.This patch release banks the generator work that landed immediately after the exhaustive-parity milestone.
This patch release banks the generator work that landed immediately after the exhaustive-parity milestone.
Highlights:
Crystal is not presented as corpus-complete: direct-C visibility is currently 16/20 no-error and 11/20 exact, and the aggressive corpus remains 10/26 exact. Those floors are now visible and ratchetable rather than hidden.
Generator throughput and certification follow-up. This cut banks the shared, deterministic blob encoder and the bounded recursive-extra construction that landed immediately after the exhaustive-parity release. It also removes the C# generation cliff caused by repeatedly rebuilding the same skipped-extra lex-preemption analysis. The release does not claim that Crystal's broader real-corpus parity tail is closed; the newly visible floors remain explicit.
cmd/ts2go blob production now share one
deterministic encoder, including stable ordering for map-bearing trailer
data and preservation of large-state GOTO metadata.This release banks the landmark exhaustive-parity closure: the curated structural matrix is 206/206 passing with zero known-degraded structural or no-
This release banks the landmark exhaustive-parity closure: the curated structural matrix is 206/206 passing with zero known-degraded structural or no-error exemptions.
Highlights:
This is a correctness milestone, not a claim of universal near-C performance. The remaining throughput and memory work stays visible in the checked-in performance ledger.
Exhaustive parity closure release. The curated structural matrix is now 206/206 pass with no known-degraded skips: the stale-skip ratchet landed first, then the final Norg alias-target divergence was fixed and its exemption removed. This cut also banks the parser, recovery, scanner, and Wave 3 measurement work that landed after v0.22.5. It does not claim that every measured grammar is near-C on performance; the remaining JavaScript, Scala, and other cliffs stay explicit in the perf ledger rather than being hidden by the release milestone.
EXEC CICS error normalization now trims recovered
procedure_division/program_definition spans to the last material child
when C stops before trailing trivia, while preserving C's zero-width EOF
recovery shape. A cgo-backed adversarial fixture now guards the recovered
error signal and byte spans against the C oracle.Nothing published for this version
Nothing published for this version
Nothing published for this version
Scoped held-out perf-ratchet release. This follows the fleet coverage cut with the exclusion machinery and ledger language needed to keep Wave 3 hones
Scoped held-out perf-ratchet release. This follows the fleet coverage cut with the exclusion machinery and ledger language needed to keep Wave 3 honest.
GTS_PERF_SCAN_EXCLUDE_PATHS, persisted scoreboard config, and status reporting for measurement-basis exclusions.perf_scan_status coverage accounting for scoped held-out budget rows, separating budgeted-with-caveat languages from ordinary green rows and hard held-outs.groovy/subprojects/performance/src/files/pleac11_15.groovy, with observed full-parse and no-edit ratios recorded from the Docker perf sweep.measurement_basis.exclude_paths as budget loosening that requires the same RCA evidence as loosening a ratio threshold.D and F# remain explicit held-outs because their current large-file witnesses fail in the C-reference side or hit the harness RSS watchdog before a stable Go-vs-C ratio can be ratcheted.
Scoped held-out perf-ratchet release. This release follows the fleet coverage cut with the exclusion machinery and ledger language needed to keep Wave 3 honest: Groovy is now budgeted under a named scoped basis, while D and F# remain explicit held-outs because their current large-file witnesses fail in the C-reference side or hit the harness RSS watchdog before a stable Go-vs-C ratio can be ratcheted.
GTS_PERF_SCAN_EXCLUDE_PATHS, persisted scoreboard config, and status
reporting for measurement-basis exclusions.perf_scan_status coverage accounting for scoped held-out budget rows, so
budgeted-with-caveat languages are visible separately from ordinary green
rows and hard held-outs.groovy/subprojects/performance/src/files/pleac11_15.groovy, with observed
full-parse and no-edit ratios recorded from the Docker perf sweep.measurement_basis.exclude_paths as budget loosening that requires the same
RCA evidence as loosening a ratio threshold.Wave-3 perf-fleet coverage and ongoing correctness checks. This release line extends perf-scan measurement coverage: the Go-vs-C full-parse ratio ratc
Wave-3 perf-fleet coverage and ongoing correctness checks. This release line extends perf-scan measurement coverage: the Go-vs-C full-parse ratio ratchet now covers 203/206 grammars (up from the targeted subset measured at the v0.22.0 checkpoint) via batches 1–7 plus a fleet gap-close sweep, while keeping the three held-out grammars explicit in the ledger. It does not yet claim universal near-C throughput: the ratchet records where every grammar stands, including held-out rows and known cliffs, and optimizing that tail plus a memory-blowup class in a few grammars remains tracked for the next waves.
perf_scan_status
coverage reporting and CI budget validation.parser_result_* and recovery-path PRs,
so masking-normalization or recovery changes surface byte-exact
verification against the tree-sitter v0.25.0 oracle instead of relying only
on smoke coverage.Language.NonTerminalAliasMap, with Lua parity,
shipped-blob inventory coverage, and synthetic edge-case tests for
self-recursive alias wrappers, singleton aliases, terminal aliases, and
deterministic row ordering.EXEC CICS
parity fix below, retaining the 25/25 real-corpus and 20/20 direct C-oracle
parity gates for this line.EXEC CICS error parity aligned with the C parser.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Completed the Wave 4 Cobol frontier work: precise ELS is now elected by default, recovered BBANK roots and recovery-frontier shapes are normalized, an
cgo_harness/perf_scan/perf_ratio_budgets.json now seeds 20 per-language budget rows, and cgo_harness/cmd/perf_scan_budget validates the budget or compares a perf_scan scoreboard against it.perf_scan_budget CI job wired into the aggregate build gate, keeping the ratchet schema/checker green without running the expensive real-corpus timing sweep on every PR.abb5d5298f01628525b4032bed780284eeb16fd2: https://github.com/odvcencio/gotreesitter/actions/runs/28968330062perf_scan_budget gate and aggregate build.RESULT: cobol -- PARITY, 25/25 no-error, 25/25 sexpr parity, 25/25 deep parity, no OOM.GOWORK=off go test ./cmd/perf_scan_budget -count=1, GOWORK=off go vet ./cmd/perf_scan_budget, budget validation, and comparison against perf_scan/out/wave2b_green_20260707T0100Z/scoreboard.json.This release does not claim universal near-C performance across the registry. It ships the checked-in ratchet and CI-visible validator needed to make future near-C claims auditable. Several budget rows remain explicitly caveated or stale until a full quiet-box ratchet sweep refreshes them.
Cobol frontier and perf-ratchet release. This release completes the focused Wave 4 Cobol frontier work and adds the first checked-in Wave 3 perf budget ratchet. It does not claim universal near-C performance; the ratchet and CI validator make future claims auditable.
cgo_harness/cmd/perf_scan_budget and the initial 20-language perf-ratio
budget seed, with a fast CI validation job wired into the aggregate build.ERROR regions so
recovered trees keep the C-oracle error carriers instead of timing out or
dropping them.Nothing published for this version
Fixed the focused C++ malformed-class recovery parity gap from Wave 5. A malformed class body followed by void A::b() {} now normalizes to the C-oracl
class body followed by void A::b() {} now normalizes to the C-oracle recovered function_definition shape without enabling cpp C-recovery globally.class_specifier, retagged namespace_identifier, and nested extra ERROR(identifier) shape.REPRO_GO_BACKEND=registry mode to the C tree-dump diagnostic so registry-backed token-source trees can be reproduced directly.staticcheck ./...; C++ recovery tests; cpp grammar regression test.harness_out/docker/20260708T113321Z-wave5-cpp-focused-cgo-clean-refactor, exit_code=0, oom_killed=false.This release does not claim full cpp corpus parity. The broader cpp single-grammar sweep still has known corpus mismatches outside this focused recovery fold. CI also remains a follow-up target: race_packages took 12m11s and grammargen_visibility took 14m40s on PR #157, so the next CI cleanup should split or cap those lanes to keep the gate near the intended ~10-minute envelope.
C++ recovery parity fold. This release fixes the focused C++ malformed-class recovery gap without enabling cpp C-recovery globally.
REPRO_GO_BACKEND=registry mode for C tree-dump
diagnostics.class bodies followed by void A::b() {} now normalize to the
C-oracle recovered function_definition shape.class_specifier, retagged namespace_identifier, and nested extra
ERROR(identifier) shapes.Fixed Cobol C-oracle span parity for fixed-format trailing trivia and guarded the normalization so free-format long-line content is not trimmed.
Cobol oracle cleanup and CI/dead-code maintenance release.
Nothing published for this version
Nothing published for this version
Roadmap checkpoint release after the v0.21 engine cut. This release lands the first four campaign buckets after v0.21.0: the runtime/recovery foundati
Roadmap checkpoint release after the v0.21 engine cut. This release lands the first four campaign buckets after v0.21.0: the runtime/recovery foundation, the external lex-state election ledger, broad precise ExternalLexStates coverage, and the Cobol large-table/recovery cleanup. It does not claim that all grammar tiers are parity-clean yet; the remaining tier-IV rows stay visible and classified for the next campaign waves. It also does not claim universal near-C parser performance across the registry yet; v0.22.0 publishes the perf-scan scaffold and targeted wins while the broader wave-3 ratchet remains tracked for the next release line.
cgo_harness/perf_scan: a nightly Go-vs-C scoring harness and CI proposal
for tracking full-parse and incremental parser performance without mixing
correctness and performance gates.cgo_harness/tier_scan/external_lex_elections.{md,json}), including the
default-elected, staged, missing-ELS, and no-scanner categories used by the
C-recovery rollout.uint16. The runtime now supports large state targets, and the
generator reports actionable boundary errors for unsupported table shapes.HasError state, so a clean recovered header no longer masks a separate
retained error in the same procedure_division subtree.Nothing published for this version
The engine release. The generalized GLR parser core — a C-faithful error recovery engine plus a GSS-forest fast path — replaces the v0.20.x per-langua
The engine release. The generalized GLR parser core — a C-faithful error recovery engine plus a GSS-forest fast path — replaces the v0.20.x per-language recovery approximations as the default runtime. Error recovery for 123 elected grammars now reproduces C tree-sitter's decisions (strategy-1 election order, per-stack-version error-mode lexing identity, error-cost model, and condense scheduling were each verified decision-for-decision against an instrumented tree-sitter v0.25.0 oracle). The campaign branch's full correctness backlog — 42 known failing tests at its peak — is zero in this release, and the root test suite dropped from ~340s to ~62s along the way.
_automatic_semicolon), replacing the grammar-level approximation. Fixes
the byte-strict ASI parity gap; spurious-HasError files on a large real
repo walk dropped 436 → 17.LexModes[0] at ERROR_STATE),
including an engine-side error-mode relex for custom token sources, with
the capability forwarded through included-range wrappers.module_repeat1 worklist blowup); the
EOF-recovery competition probe no longer declines ordinary clean input;
and Parser.SetTimeoutMicros is now enforced inside the forest path
(previously unenforceable for forest-dispatched languages)._whitespace extra tokens like C's
generated lexer instead of silently skipping horizontal whitespace, fixing
a 1-byte recovery-anchor divergence.f(a,b) = c[d] tuple assignments) no longer
corrupts the enclosing production or kills the stack; C's nested shape is
restored.-race suite now actually runs for non-draft PRs without
panicking Go's default per-package timeout (-timeout 35m -p 1, 60m job
budget); wall-clock boundedness contracts skip under -race
(instrumentation-slowdown measurement, not parser boundedness);
./grammargen runs as a non-blocking visibility step until its
enumerated pre-existing backlog (stale markdown blob, two Dart parity
gaps) is burned down.docs/authoring-languages.md — adding a language without forking:
grammar.json → grammargen → blob → Register/RegisterExtension/taproot,
the wantsForest opt-in, generator budgets, and blob provenance
discipline.docs/external-scanners.md — when a grammar needs an external scanner and
the Go porting contract (emit extras, C-EOF behavior, error-mode lexing,
token-source responsibilities), with Pawn's five externals as the worked
case study.grammars/clean_regression_pins_test.go).Patch release recovering C# large-namespace method/type declarations and the Swift ternary/conditional operator, both via post-parse source recovery p
Patch release recovering C# large-namespace method/type declarations and the Swift ternary/conditional operator, both via post-parse source recovery passes, plus a CI stability fix.
JsonTextReader.cs / JsonReader.cs) now recover their method_declaration nodes instead of yielding only a comment-filled namespace shell. Namespace recovery now falls back, when the child-based pass surfaces no method, to a per-member bounded source reconstruction. JsonTextReader.cs now recovers 68 methods (was 0) and JsonReader.cs 41 (was 0). Fixes #136 (#138). Thanks @richardwooding for the report, repro, and the fix.cond ? a : b) now recovers instead of dropping ? a : b into an ERROR node in every position — previously any function containing a ternary lost its whole parse. A post-parse recovery pass reconstructs the ternary_expression node by reparsing the source with the ? if_true : if_false tail blanked so the condition parses in place, then splicing a synthesised node back in with the upstream condition/if_true/if_false layout. The rewrite is accepted only when the result is error-free and byte-faithful, so non-ternary code is never affected. Fixes #135 (#137). Thanks @richardwooding for the report and the fix.TestCSharpLargeShreddedNamespaceRecoversMethods now skips under go test -race: the per-member bounded recovery reparses each class member as its own small GLR parse, which normally finishes well inside the parser's timeout budget, but race-detector instrumentation slows the same work enough to trip the parser's internal wall-clock timeout. Non-race coverage keeps the full recovery assertions.A root-cause fix for Swift's grammar (native ternary parsing via a regenerated grammar blob/table, rather than a post-parse recovery pass) is in progress on the parser-generalization campaign branch and will ship in a future release.
Full Changelog: https://github.com/odvcencio/gotreesitter/compare/v0.20.8...v0.20.9
Patch release recovering C# large-namespace method/type declarations and the
Swift ternary/conditional operator, both via post-parse source recovery
passes, plus a CI stability fix for the new C# recovery test under -race.
JsonTextReader.cs / JsonReader.cs) now recover their
method_declaration nodes instead of yielding only a comment-filled namespace
shell. Follow-up to #115/#116: the source-based type/method reconstruction was
gated off above 4096 bytes, so nothing rebuilt the members of a large collapsed
class. Namespace recovery now falls back, when the child-based pass surfaces no
method, to a per-member bounded source reconstruction — the type shell's
header is reparsed for its modifiers/name/base list, and each member is
recovered on its own (a method via signature-shell + lenient block, other
members by a single small wrapped reparse), skipping any that still won't parse.
Each reparse is a single small snippet capped by size and count and honors the
parser timeout, so the anti-OOM guarantees from #64/#98/#106 are preserved and
the whole-file 4096-byte gate is unchanged. JsonTextReader.cs now recovers 68
methods (was 0) and JsonReader.cs 41 (was 0). Thanks @richardwooding (#136, #138).cond ? a : b) now recovers instead of
dropping ? a : b into an ERROR node in every position. The runtime Swift
blob never fired the ternary_expression reduction, so any function containing
a ternary lost its whole parse (collapsing to
_modifierless_function_declaration_no_body). A post-parse recovery pass
reconstructs the ternary_expression — reparsing the source with each
? if_true : if_false tail blanked so the condition parses in place, then
splicing a synthesised node with the upstream condition/if_true/if_false
layout. The rewrite is accepted only when the result is error-free and
byte-faithful, so non-ternary code is never affected. Thanks @richardwooding
(#135, #137).TestCSharpLargeShreddedNamespaceRecoversMethods now skips under go test -race: the per-member bounded recovery reparses each class member as its
own small GLR parse, which normally finishes well inside the parser's
timeout budget, but race-detector instrumentation slows the same work enough
to trip the parser's internal wall-clock timeout. Non-race coverage keeps
the full recovery assertions; mirrors the existing Scala realworld-recovery
-race skip.Nothing published for this version
Downstream consumers that generate a parser table with grammargen can now opt their own grammar into the GSS-forest GLR fast path without forking gotr
Downstream consumers that generate a parser table with grammargen can now opt their own grammar into the GSS-forest GLR fast path without forking gotreesitter, via three surfaces:
Language.WantsForest — Go field; gob-serialized, so it's baked into GenerateLanguageAndBlob output and backward-compatible.grammargen.Grammar.WantsForest — Go flag on the grammar IR, plumbed onto the assembled Language."gotreesitter": { "wantsForest": true } in grammar.json — declarative; read by ImportGrammarJSON and mirrored back by ExportGrammarJSON only when set, so standard grammars' output is byte-unchanged.Built-in languages keep their curated, byte-range parity-certified forest defaults (behavior unchanged). Consumer opt-in is at the consumer's responsibility — the forest's decline→production fallback still prevents hard failures on declined inputs, but a clean-but-different tree is the consumer's to own. ExtendGrammar inherits the flag from its base grammar.
Full Changelog: https://github.com/odvcencio/gotreesitter/compare/v0.20.7...v0.20.8
Adds consumer-controllable forest parsing.
Language.WantsForest field (gob-serialized into blobs), the
grammargen.Grammar.WantsForest flag, and a declarative
"gotreesitter": { "wantsForest": true } object in grammar.json (read by
ImportGrammarJSON, mirrored back by ExportGrammarJSON only when set, so
standard grammars' output is unchanged). Built-in languages keep their curated,
byte-range parity-certified forest defaults; consumer opt-in is at the
consumer's responsibility, with the forest's decline→production fallback still
preventing hard failures on declined inputs. ExtendGrammar inherits the flag
from its base grammar (#134).Parser timeout and cancellation budgets now flow through the parser loop, recovery reparses, result compatibility/finalization, and Go normalization,
then, and, with, else, elif, and end, preventing scanner panics on malformed or edge-case indentation (#129, #130).if … else if … trailing-closure ambiguity recovery now follows the whole chain and requires a byte-faithful reparse, preventing collapsed function declarations from being accepted (#131, #132).Patch release for parser timeout propagation and targeted language recovery scanner fixes merged after v0.20.6.
then, and, with, else, elif, and end, preventing
scanner panics on malformed or edge-case indentation (#129, #130).if … else if … chains no longer collapse the enclosing function to
_modifierless_function_declaration_no_body (#131). The trailing-closure
ambiguity recovery now follows the whole if/else-if chain — the chained if
keyword is swallowed into an ERROR node, so it is discovered by scanning from
the body's matching close brace — and requires a byte-faithful reparse so a
partially-bracketed chain (which silently truncates without an ERROR node) is
rejected rather than accepted (#132).Patch release for parser recovery correctness, grammargen parity, and the forest/performance workstream merged after v0.20.5.
Patch release for parser recovery correctness, grammargen parity, and the forest/performance workstream merged after v0.20.5.
ErrParseStoppedEarly for timeout,
cancellation, token-source EOF, and parser safety-limit partial trees while
preserving the returned tree for diagnostics.NodeAtByte and NamedNodeAtByte helpers on Tree and Node for editor
offset lookup without hand-written tree walks.grammars.LoadLanguage(name, blob) attaches registered external scanners and
external lex-state tables when loading raw grammar blobs.Language.Size() reports approximate decoded table and lookup-cache bytes for
diagnostics and cache policy decisions.{a}b=c,
matching the C parser on minified bundle shapes (#111).ParserPool.Parse crash reported against command_test.go and
completions_test.go (#110).children, fieldIDs, and
fieldSources aligned when a cyclic edge is removed (#121).source_file root when
child nodes contain parse errors, matching the root-shape behavior already
used for SQL and Swift (#112).grammargen now treats explicit precedence wrappers around finite string
choices, such as prec.right(choice("=", "+=", "-=")), as reducible
nonterminals instead of overlapping named lexer tokens. This restores wrapper
nodes and lets LR precedence resolve the intended conflict (#122).for…in loop over a range (0..<n, 0...n)
or a call expression (stride(from:to:by:)) no longer silently collapse to
_modifierless_function_declaration_no_body with the loop body spilled out as
file-level siblings. As with the if/while case, the loop body brace was
being consumed as a trailing closure of the iterable; recovery now re-parses
the affected for…in headers with synthetic parentheses around the iterable
and maps the result back to byte-faithful original coordinates. Because this
misparse produced no ERROR node, the recovery pass now runs whenever the
detection walk finds a collapsed header rather than only on errored trees
(#123).TestGoCobraLargeFileParseRegression, gated by
GTS_COBRA_REGRESSION_ROOT, for exact large-file release validation without
making normal test runs network- or corpus-dependent.grammargen no longer imports the grammars registry. The grammar.js importer (ImportGrammarJS) previously pulled in grammars for the embedded JavaScrip
grammargen no longer imports the grammars registry. The grammar.js
importer (ImportGrammarJS) previously pulled in grammars for the embedded
JavaScript language, which transitively bundled all ~200 grammar blobs
(~22MB) into every consumer that merely defined a grammar via the DSL —
including taproot and all downstream DSLs. The JS language is now injected
via SetJSGrammarProvider; blank-import grammargen/grammarjs (or cmds
that need -js) to register it. Net effect: grammargen, taproot, and
anything that only defines/loads a grammar are now grammar-registry-free.Nothing published for this version
taproot/walk: a grammar-free core of the taproot harness. It loads a tree-sitter Language from a pre-generated blob (LanguageFromBlob) and navigates t
taproot/walk: a grammar-free core of the taproot harness. It loads a
tree-sitter Language from a pre-generated blob (LanguageFromBlob) and
navigates the CST (Walker, ParseFromBlob, ParseWithLanguage) depending
only on the gotreesitter runtime — not grammargen or the grammars
registry. DSLs that embed a generated grammar blob can now parse/highlight
without linking the ~200-grammar registry (~22 MB). The grammargen-backed
build-from-DSL fallbacks remain in taproot, which re-exports walk.Walker
so existing taproot.Walker/Parse callers are unaffected.Patch release on the 0.20 line: parser error-recovery fixes (two community PRs from @richardwooding) plus a Go normalization safety fix.
Patch release on the 0.20 line: parser error-recovery fixes (two community PRs from @richardwooding) plus a Go normalization safety fix.
ERROR node with zero recoverable declarations. Namespace recovery now falls back to a best-effort namespace_declaration built from the existing sub-parse, surfacing the type declarations (and the members that parsed). Brace matching during recovery is now trivia-aware, so braces inside char literals, strings, and comments no longer truncate a recovered declaration's span.if/while condition contains a comparison operator (< / > / ==, etc.) no longer collapse into an ERROR tree with no recoverable function_declaration. The body brace was being consumed as a trailing closure of the condition's last operand; recovery now re-parses the affected conditions with synthetic parentheses and maps the result back to byte-faithful original coordinates.normalizeGoDotLeafChildren now walks dotted-selector chains with an iterative DFS instead of recursion, removing a stack-depth risk on very long selector chains.{a}b=c — collapsing to a root ERROR) remains open. A banked, skipped regression test ships with this release. The root cause is the JSX-attribute-continuation ASI heuristic in the JS scanner suppressing automatic-semicolon insertion for }identifier=…; the fix is targeted for the C-oracle-verified parity line rather than a point patch.CI is green on the release commit (build, parity-cgo, freshness).
ERROR node with zero recoverable declarations. Namespace
recovery now falls back to a best-effort namespace_declaration built from
the existing sub-parse, surfacing the type declarations (and the members that
parsed) instead of discarding the whole file. C# brace matching used during
recovery is now trivia-aware, so braces inside char literals, strings and
comments no longer truncate a recovered declaration's span (#115).if/while condition contains a comparison operator
(< / > / ==, etc.) no longer collapse into an ERROR tree with no
recoverable function_declaration. The body brace was being consumed as a
trailing closure of the condition's last operand; recovery now re-parses the
affected conditions with synthetic parentheses to remove the ambiguity and
maps the result back to byte-faithful original coordinates (#118).normalizeGoDotLeafChildren now walks dotted-selector chains with an
iterative DFS instead of recursion, removing a stack-depth risk on very long
selector chains.TestJavaScriptBlockThenAssignmentParsesClean, for the JavaScript
block-then-simple-assignment GLR collapse ({a}b=c, #111). The root cause is
the JSX-attribute-continuation ASI heuristic in the JS scanner; the fix is
still pending (targeted for the C-oracle-verified parity line). Remove the
t.Skip to validate once fixed.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Patch release for the post-v0.20 parser reliability train.
Patch release for the post-v0.20 parser reliability train.
Fixed:
Testing:
Note: #105 remains open for the broader forest/ergonomics branch; it is not part of this release.
Patch release for the post-0.20 parser reliability and code-understanding surface fixes. This tagged release references the issue fixes merged after v0.20.1.
import Foundation followed by declarations, covering the real-world Swift
misparse report while avoiding recursive recovery (#99, #107).int or
error as definition.function tags (#100, #109).case _:/block-start normalization now match the C tree-sitter shapes used
by the parity harness (#101, #102, #103, #108).Taproot blob-loading helpers and stable parser harness coverage for the extracted Taproot DSL surface.
Taproot stable release.
GLR parser-core release after the 0.20 release-candidate line.
GLR parser-core release after the 0.20 release-candidate line.
markdown_inline.Extracted Taproot as a reusable DSL parsing harness with diagnostics.
Fourth 0.20 release candidate.
Third release candidate on the 0.20 line. Parser-core GLR performance wins bring C to/below parity with tree-sitter C on real corpus, plus parser corr
Third release candidate on the 0.20 line. Parser-core GLR performance wins bring C to/below parity with tree-sitter C on real corpus, plus parser correctness fixes and markdown grammargen advances. All changes byte-for-byte C-parity-verified; CI green (build, parity-cgo, perf-regression).
Extended the RepetitionShiftConflictChoice resolver to collapse spurious reduce/shift forks where tree-sitter C resolves deterministically (verified per state against C's parser.c — the reduce is a zero-progress dead-end, no conflicts: entanglement).
translation_unit_repeat1 (top-level list) + preproc_if_repeat1 (preprocessor body) collapse — large__cluster.c 20,866 → 1,099 GLR forks (−95%), ~−30% parse wall, bringing C to/below parity.delim_token_tree_repeat1) continuation-token fork reduction.external_lex_state indexing.html_block type 6/7 blank-line termination; link_reference_definition soft-break de-mergeFull changelog: https://github.com/odvcencio/gotreesitter/blob/v0.20.0-rc3/CHANGELOG.md
Third release candidate on the 0.20 line. Parser-core GLR performance wins — C now parses at/below parity with tree-sitter C on real corpus — plus parser correctness fixes and markdown grammargen advances. CI green (build, parity-cgo, perf-regression).
RepetitionShiftConflictChoice resolver to collapse spurious reduce/shift
forks at boundaries where tree-sitter C resolves deterministically (verified
per state against C's parser.c; the reduce is a zero-progress dead-end with
no conflicts: entanglement). Every change is byte-for-byte C-parity-verified
against libtree-sitter.
translation_unit_repeat1 (top-level item list) + preproc_if_repeat1
(preprocessor body) collapse — large__cluster.c drops from 20,866 to
1,099 GLR forks (−95%) and ~−30% parse wall, bringing C to/below parity.delim_token_tree_repeat1) continuation-token
fork reduction.external_lex_state indexing (single active state references the
precomputed row instead of rebuilding it per token).html_block type 6/7 at a blank line.link_reference_definition soft-break terminator.Nothing published for this version
Nothing published for this version
Nothing published for this version
Second release candidate on the 0.20 line. Builds on v0.20.0-rc1 (markdown grammargen substrate) with runtime/parser wins, a new packaging feature, an
Second release candidate on the 0.20 line. Builds on v0.20.0-rc1 (markdown grammargen substrate) with runtime/parser wins, a new packaging feature, and further markdown grammargen fixes. CI green (build, parity-cgo, perf-regression).
-tags 'grammar_subset grammar_subset_<lang>' to embed only the chosen grammar blobs. A single-language binary drops ~24 MB → ~3.7 MB (84.7%) and stays self-contained (no GOTREESITTER_GRAMMAR_BLOB_DIR needed). Finer-grained than grammar_set_core, and embedded unlike grammar_blobs_external. New generator cmd/gen_subset_blob_embeds; default builds remain byte-identical (backward compatible).emit / parse / doctor subcommands + docs.source_file / function_declaration shape while preserving child error state.block_quote / list / fenced_code_block wrapper emission at top-level and inside containers; pipe-table body-row de-merge + wrapper; link-ref-def / blank-line newline-state de-merge; markdown_inline generation-timeout calibration.rc2, not v0.20.0These are grammargen compiler-import quality regressions (reproducing the grammar from grammar.json). The bundled .bin blobs for these languages are unaffected and runtime parsing is fine. They pass within test floors (CI is green) but block a clean v0.20.0:
requirements, jsdoc, graphql, proto — TestMultiGrammarImportPipeline shape / external-scanner-wiring / alias-promotion regressions. To be fixed before promoting to v0.20.0.Runtime consumers (parsing via the bundled blobs) can adopt rc2 safely — the parser-core work is proven non-regressing. Consumers using grammargen to import requirements/jsdoc/graphql/proto from grammar.json should wait for v0.20.0.
Nothing published for this version
Kotlin compatibility patch for recoverable source-file parses.\n\n- Return recoverable Kotlin top-level parse roots as source_file while preserving ch
Kotlin compatibility patch for recoverable source-file parses.\n\n- Return recoverable Kotlin top-level parse roots as source_file while preserving child error state.\n- Recover fragmented top-level fun declarations with the fun keyword, name, and parameter list so downstream source_file-rooted queries keep matching.\n- Intended to unblock Aspect/Gazelle gotreesitter drop-in testing without changing public Orion AXL queries.
Kotlin source-file query compatibility patch.
source_file roots instead of ERROR roots, while
preserving child error state for diagnostics.fun declarations recovered under an error root
now expose function_declaration shape with the fun keyword, name, and
parameter list, while retaining error state. This preserves downstream
Aspect/Gazelle Orion queries without AXL rewrites on files with recoverable
syntax errors.GLR materialization, query parity, and parser hot-path release.
GLR materialization, query parity, and parser hot-path release.
source_file -> import_list -> import_header patterns
without requiring query rewrites.#lua-match? predicate parity and query predicate stack storage now match
expected tree-sitter semantics more closely.legacy_generated_register_stubs build tag; the generated registry
is now the single checked-in grammar registration surface.cmd/grammargen via
-lr-split, reducing the public command set while keeping the regeneration
path available.grammarlsp side package and its LSP/SegmentIO
dependencies from the root module.~1.54 ms, incremental single-byte edit ~649 ns, no-edit
incremental reparse ~2.43 ns. Full parse now reports 728 B/op and
7 allocs/op on this workload.GOMAXPROCS=1 go test . -run '^$' -bench 'BenchmarkGoParseFullDFA|BenchmarkGoParseIncrementalSingleByteEditDFA|BenchmarkGoParseIncrementalNoEditDFA' -benchmem -count=10 -benchtime=750ms.Nothing published for this version
Cold dependency extraction and parser materialization diagnostics release.
Cold dependency extraction and parser materialization diagnostics release.
ExtractImports, ExtractImportsFromSource, and
ExtractImportsFromSourceWithReport. The source extractor reports status,
reason, and fallback recommendation so callers can use a fast source scan and
fall back to a full tree parse only when needed.cgo_harness/cmd/import_replay, a Bazel/Gazelle-shaped replay command that
scans repositories and compares cgo tree extraction, Go tree extraction, and
hybrid source extraction with normalized dependency-output diffs and timing
JSON.__future__ imports,
multiline imports, relative imports, and triple-quoted strings consistently
across source and tree extractors..canopy/ is ignored and stale tracked scratch programs were removed.**
instead of letting shared shorter literals split them during generated-parser
lexing.rules_python replay with 564 Python files and 949 imports, hybrid
source extraction matched cgo tree extraction and Go tree extraction exactly:
cgo parse+extract was about 158 ms, Go tree extraction about 1.17 s, and
source extraction about 3.9 ms.rules_jvm replay with 231 Java files and 1028 imports, hybrid source
extraction matched cgo and Go tree extraction exactly: cgo parse+extract was
about 70 ms, Go tree extraction about 276 ms, and source extraction about
1 ms.aspect-gazelle Go replay with 148 files and 916 refs, hybrid source
extraction matched cgo tree extraction exactly in about 0.7 ms; Go full-tree
extraction missed 8 refs because three full-tree parses were incomplete.4 GB memory and 1 CPU with
oom_killed=false.Python parser compatibility patch for downstream Gazelle consumers.
Python parser compatibility patch for downstream Gazelle consumers.
_ identifiers no longer get retokenized as EOF during contextual literal repair. This prevents clean prefix parses from silently truncating modules before later assignments or nested imports.Module compatibility patch for downstream Gazelle consumers.
Module compatibility patch for downstream Gazelle consumers.
go directive from 1.25.0 to 1.22.0.golang.org/x/sync to v0.11.0 so consumers that import gotreesitter only as a parser runtime are not forced onto Go 1.25.go test . ./grammars -run '^$' -count=1Module compatibility patch for downstream Gazelle consumers.
go directive from 1.25.0 to 1.22.0 and pin
golang.org/x/sync to v0.11.0, avoiding accidental Go 1.25 upgrades for
downstream consumers that import gotreesitter only as a parser runtime.Query predicate compatibility patch for downstream Gazelle consumers.
Query predicate compatibility patch for downstream Gazelle consumers.
#has-parent? with immediate parent semantics, matching the existing #not-has-parent? support.go test . -run 'Test.*Predicate' -count=1go test . -run 'TestParsePredicateHasParent|TestMatchPredicateHasParent|TestMatchPredicateNotHasParent|TestParsePredicateAncestorPredicates' -count=1Kotlin parser compatibility patch for downstream Gazelle consumers.
Kotlin parser compatibility patch for downstream Gazelle consumers.
fun interface declarations.. or import.go test ./grammars -run 'TestKotlinDottedPackageAndImportsParseWithoutErrors|TestKotlinFunInterfaceWithPackageImportParsesWithoutErrors|TestKotlinSwiftExternalScannerSpecs|TestLanguageBoundExternalScannersBindBySymbolName|TestExternalScannerBindingFallbackUsesUnmappedExternalSymbols' -count=1go test . -run '^$' -count=1