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.
Nothing published for this version
Nothing published for this version
Recovery reductions preserve deferred parent links during fresh parses. Valid Go files remain complete during final result materialization. The invari
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
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
This release closes the generalized incremental-correctness campaign: capability-based scanner admission, exact checkpoint receipts for stateful GSS f
This release closes the generalized incremental-correctness campaign: capability-based scanner admission, exact checkpoint receipts for stateful GSS forest reuse, strict ownership and fail-closed boundaries, JavaScript/TypeScript incremental scheduling work, and broader stateless-scanner admission. It also refreshes repository and release hygiene. See CHANGELOG.md for the complete evidence and residuals. This is the final planned off-cadence minor; planned minor releases move to Thursdays in America/Los_Angeles.
Stateful GSS forest trees now enter incremental reuse through exact
checkpoint receipts. Admission requires the scanner's generic checkpoint
and incremental-reuse capabilities, then authenticates non-empty start and
end snapshots at every reachable token boundary. A missing endpoint declines
the forest as scanner_checkpoint_unavailable instead of letting distinct
unrepresentable states collide as empty snapshots. A length-changing
stateful witness requires actual subtree reuse and deep fresh-tree equality;
a synthetic absent-checkpoint scanner locks the fail-closed path.
GSS forest trees now use capability-based incremental admission. Forest construction records exact pre-goto ownership for every reusable subtree, and the reuse cursor requires that ownership before transferring top-level nodes. Languages without an external scanner, plus scanners with an explicit stateless/failure-preserving proof, can therefore reuse forest-built trees without a language-name allowlist. AWK, KDL, Nix, Squirrel, and Uxntal are newly admitted through a shared multi-position and 137 KiB fresh-tree differential.
JavaScript, TypeScript, and TSX leading incremental reuse is admitted. The generic byte-identity, fragility, and scanner gates now govern unchanged leading siblings without a language-name holdback. Exhaustive clean byte-edit sweeps compare the complete incremental tree directly with a fresh parse, and the 20 KiB/137 KiB latency gate plus its opt-in 1 MiB tier lock middle and end edits to small, size-independent work counters. Transient-error insert/delete/replace edits retain separate recovery and memory bounds.
TypeScript and TSX now parse import-type queries in generic call type
arguments. Forms such as foo<typeof import("module")>() and
foo<import("module").Name>() use a pinned upstream grammar overlay that is
applied identically during ts2go generation and C-oracle parity builds.
Ordinary dynamic import() expressions remain call expressions.
Eight additional stateless scanners are certified for changed-edit reuse: Comment, Dhall, DTD, Foam, Godot Resource, Kconfig, Odin, and RON. Each passes the shared multi-position 4 KiB edit matrix and a 137 KiB changed-length fresh-tree differential with actual subtree reuse. Kconfig's deliberately small 16-byte macro floor keeps its parser-level ownership residual visible without treating performance as a correctness gate.
Twelve more stateless scanners are certified for changed-edit reuse: EditorConfig, Fennel, Fish, GN, Janet, Julia, Less, Liquid, Pkl, Racket, TableGen, and Yuck. The shared fresh-tree matrix enforces real reuse across edit classes and positions, with measured 137 KiB floors that preserve low ownership-reuse cases as visible performance residuals.
The stateless-scanner admission matrix now also covers Gleam, Move, Tcl, and WGSL. Each scanner passes the shared 4 KiB multi-position edit matrix and 137 KiB fresh-tree differential with a measured reuse floor. AWK and Squirrel remain fail-closed because their old trees use the GSS forest fast path; scanner statelessness alone does not bypass that parser-level gate.
Stateless external-scanner reuse now covers Cue, D, Elixir, and Erlang. Capability markers replace language-name admission, while a strict recorded pre-goto ownership check prevents stale whole-sibling transfer for the certified stateless class. A shared differential matrix covers insert/delete/replace edits across 4 KiB fixtures and a 137 KiB macro lane, requiring real reuse and exact fresh-tree identity. Checkpointed reuse also authenticates scanner state at the current lookahead's start rather than its post-lex live state. Stateful scanners without a complete proof remain fail-closed.
HTML external-scanner reuse is checkpoint-certified for clean old trees. The complete open-tag stack now serializes exactly or returns an absent checkpoint; oversized depth, custom names, and buffer exhaustion can no longer truncate or alias state. Malformed checkpoint bytes are rejected, failed scans preserve state, and token relexing rejects absent start or live checkpoints. Changed-length edit witnesses at three positions plus a 137 KiB lane require real reuse and fresh-tree equality. Error-bearing old HTML trees remain an explicit fresh-parse fallback while recovery ownership is still uncertified.
SQL external-scanner reuse is now checkpoint-certified. The runtime's checkpoint and checkpointless-reuse gates are capability based rather than language-name allowlists. SQL records a complete dollar-quote-tag state whenever it fits the checkpoint buffer (including an explicit empty-state checkpoint), preserves that state on failed scans, and fails closed only for incremental reuse when a valid tag is too large to restore exactly; full parsing continues to accept the tag, matching C semantics. Svelte remains opted out of changed-edit reuse pending certification of its scanner-wide raw-text and expression-block behavior. Clean and recovered insert/delete/replace witnesses at the start, middle, and end of roughly 20 KiB and 137 KiB files enforce fresh-tree equality, full-span coverage, deterministic work, and bounded memory; an opt-in tier repeats the matrix at 1 MiB. This is a correctness/admission certification, not an O(edit) claim: the 1 MiB lane is catastrophe-bounded and its measured allocation/RSS scaling remains an explicit performance residual.
Collapsed named-leaf ownership now covers exact adapted artifacts. The 23 registered parent/raw-child pairs compile into the native reduction, alias, forest, and compact-materialization policy for exact built-ins as well as true adapted clones retaining the exact-profile receipt and exact named parent/raw-child metadata identities; display-name or pair-level metadata matches do not admit arbitrary custom grammars. Focused adapted incremental/fresh witnesses require exact deep-tree equality and zero safety-net rewrites. A quantified synthetic lost-identity residual remains unsupported because its live construction provenance is unknown. No language-specific normalizer was added.
Compact parser admission is ratcheted at 166 byte-exact routes out of 206 fixtures, with 35 fail-closed fallbacks and 5 token-source skips.
GTS_ADMISSION_CANDIDATE environment variable route
eligible full parses through the compact parser core. Internal
sub-parsers stay suppressed. A 206-language scorecard guards the
route: 48 languages parse byte-exact, 153 fall back fail-closed, 5
skip, 0 diverge. It initially landed off by default; the Changed entry
below records its promotion after the admission evidence was sealed.docs/compact-route-coverage-census.md classifies the 153 fallback
languages into five scheduler-capability classes. The census found no
multi-derivation blockers.cgo_harness (PR #413). The root
library module is unchanged by that PR.Result compatibility cleanup. A source-of-truth ownership registry,
supporting documentation, and a CI guard now track compatibility passes and
their retirement criteria. The dead terminal-normalization wrapper was
removed, along with the unreferenced walkResultTreePostorderUntil and
rewriteResultTreeChildrenPostorderWithStats traversal helpers. Recovered-tree
cycle repair was replaced by an always-on, non-mutating validator that fails
closed with the public ParseStopInvariantViolation reason. The roadmap now
puts repository maintenance, explainability, documentation, ownership
receipts, and upstream retirement of normalization shims before the next
major performance milestone; performance gates remain advisory during this
cleanup. All 23 collapsed named-leaf rows for six exact-profile built-in
languages now materialize natively across their admitted routes. The generic
compatibility walk and its synthetic reconstruction helpers are retired;
exact-profile adapted artifacts retain the native route, while unregistered
custom artifacts fail closed instead of inferring children from display names.
Compact admission now ratchets breadth, depth, and edit reuse. The shared production clean-tail proof admits compact roots that stop immediately before trailing parser padding, raising the 206-language smoke scorecard from 48 to 166 byte-exact routes (35 fail-closed fallbacks, 5 token-source skips, 0 divergences). Representative multi-line fixtures freeze production and candidate digests, while CI enforces both the breadth floor and routed depth. Admission materialization now carries a per-tree parser-state replay proof: grammars with complete required states and proven scanner quiescence retain incremental subtree reuse; unproven/stateful scanners remain barred, apart from independently re-lexed token-invariant single-leaf edits. Certified or explicitly requested forest routes retain precedence unless the caller explicitly forces the compact candidate.
The compact parser core is now the default full-parse route for eligible
languages (Phase-3 admission flip). Parser.Parse routes a fresh, full,
production-DFA parse of an eligible grammar through the compact
internal/parsercorephase0 engine, then materializes a public tree. The tree
is byte-exact with the production engine on the routed, verified surface: the
166 byte-exact scorecard routes and the canonical fixtures. The runner's strict
acceptance gate fails closed to production on any input it cannot reproduce
byte-for-byte. The compact engine promotes from the gts_parsercorephase0
opt-in tag into the default build; the emergency opt-out tag
gts_no_parsercorephase0 compiles it back out.
Evidence for the admission:
Correctness. 206 of 206 curated parity fixtures pass. The deep-tree digest is 100 percent exact on the canonical fixtures. The 206-language scorecard through the switch reports 166 byte-exact routes, 0 divergences, 35 fail-closed fallbacks, and 5 token-source skips.
Fail-closed generic-call conflict class. On the ambiguous Go construct
Foo[int](a), production and the tree-sitter-go C oracle select
type_conversion_expression(generic_type). The compact scheduler cannot
yet rank that conflict by dynamic precedence, so it declines the
unauthorized tie fold and falls back to production. The returned tree stays
byte-exact while TestAdmissionCandidateGoTypeConversionFailsClosed keeps
the route/fallback behavior explicit.
Timing. The quiet-host publication run (lane
strictboundary-20260720T231334Z-v6 phase3, n2d-standard-4, 5 ABBA cycles)
measured a production-over-candidate geomean speedup of 1.8321 (gate is at
or above 1.0204) on the warm direct-runner path
(BenchmarkParserCoreFreshFullCanonical). The worst fixture ran 1.526 times
faster. Peak resident set size fell on all four fixtures (grammargen_lr
94 MB against 206 MB). The deep C-oracle parity preflight passed in the same
run.
Adapter Parse-path reconciliation. The 1.8321 geomean was measured on
the direct-runner path, not on Parser.Parse. The initial adapter regressed
time and allocations, because it rebuilt the compact action tables on every
fresh Parser and did not pool the materialization scratch. Two adapter
fixes removed that tax:
*Language table cache builds the converted action and reduction
tables once per language (about 95 KiB retained) instead of once per parse;
andParser runner reuses the materialization scratch, the public-tree
node buffers, and the Go-compatibility walk stack across parses.After the fixes, warm route-ON allocations on BenchmarkGoParseFullDFA fall
from about 71 to about 24 per operation, and bytes per operation from about
99 KiB to about 17 KiB. On the human-authored Go fixtures
(BenchmarkGoParseWarmRealDFA) the routed parses now run about 1.45 to 1.66
times faster than production through Parser.Parse (geomean of the routed
fixtures about 1.57 times). The remaining gap to the 1.8321 direct-runner
number is the production Parse tail the adapter still runs. On the synthetic,
highly repetitive BenchmarkGoParseFullDFA source the routed parse stays
slower than production, because the compact scheduler dominates that input;
the speedup holds on the human-authored fixtures the sealed number measured.
Sealed epoch (v0.45.0). The compact route measured 2.9975 times the C reference against the production route at 5.526 times, hardware-attested and verified. Allocation levels sit at 92 to 316 allocations per operation against 14 to 200 for production, admission-compatible per the 2026-07-20 owner ruling.
Known gap. The candidate retained-heap column reported NA in the phase3 environment; resident set size is the resource evidence.
Escape hatch: set GTS_ADMISSION_CANDIDATE=0 (or false, off, no) to
force every parse back onto the production route. Any other value, or an unset
variable, keeps the compact route on. (*Parser).SetAdmissionCandidateRoute
overrides the process default per parser.
Dual-route statement: ParseIncremental and every reuse-consuming parser
operation stay on the production engine. A compact old tree may now supply
reusable subtrees only when its materialization attached the required replay
states and its scanner is provably quiescent; otherwise reuse fails closed to
a full production parse. Token-invariant single-leaf edits are separately
re-lexed and admitted only on exact symbol/span identity.
Memory-budget contract: the compact scheduler does not poll the automatic
large-input memory budget. The switch declines every input at or above the
source-length floor where the production route arms that budget (64 KiB), so
such inputs stay on production and honor ParseStopMemoryBudget. Adding
scheduler-level budget polling to the compact route is the follow-on campaign.
The GLR steady-state merge now compares structure before score (PR #416). The TypeScript and TSX steady-state merge budget widens from one survivor to two. The wider budget activates the structural comparison at the merge site. This is the structural cure for the detector class behind issue #389 and issue #402.
Admitted clean top-level edits now reuse both leading and trailing
sibling runs (PR #418, PR #421, campaign O(edit)). PR #418 bounds arena
normalization to the edited range. A 1MB clean-Go near-top keystroke drops
from about 356ms to about 53ms. PR #421 splices the leading run of unchanged
top-level items, the mirror of the trailing block-splice. A 1MB mid-file
keystroke drops from about 269ms to about 67ms for Go, and from about 168ms
to about 45ms for CSS. At 137KB, mid-file reuse rejects fall from 16,450 to
10. Length- or point-changing Tree.Edit calls still maintain coordinates
through affected trailing sibling subtrees, so this is not an absolute
whole-call O(edit) claim. JavaScript, TypeScript, and TSX keep their
previous leading-run behavior until the T2c scanner proofs land. The W5
latency gate locks these counters per edit position.
Nothing published for this version
TypeScript arrow functions with a return-type annotation no longer collapse to ERROR as a const/let initializer (issue #402, PR
ERROR as a const/let initializer (issue #402, PR
#409). Example: const f = (a: A): B => { ... }. The typed-arrow and
destructured-arrow-return-type detectors added in PR #389 did not
cover this shape. Neither required the arrow to be immediately
preceded by ). A typed, non-destructured parameter list combined
with an explicit return-type annotation fell through both. This fix
adds a dedicated detector for that shape. It widens the merge budget
to two survivors, matching the typed-arrow and default-parameter
cases. TSX was unaffected; its wider JSX conflict set already kept a
second survivor alive. The detector also covers parenthesized return
types: (a: A): (B) => a, (a: A): (string | number) => a, and
(a: A): (() => B) => a. Its backward colon scan now balances
parentheses, so a colon nested inside the return type is not mistaken
for the top-level boundary. This is the third source-heuristic
merge-width detector guarding the same root cause as the PR #389
default-parameter fix. That root cause: the GLR engine's steady-state
merge budget discards a live fork by score before any structural
comparison runs.
The structural cure — comparing candidate forks structurally before
falling back to score at the merge site — remains tracked, in active
development on codex/glr-structure-before-score. Like its
siblings, this detector's backward scan is bounded to a
512/2048-byte window; a return-type expression whose own top-level
colon sits past that window silently misses the widening.new(pkg.Type), new(*T), new(**T), and parenthesized type
arguments now byte-match the C oracle (issue #375 class, valid
forms; PR #408). The parser previously parsed these structured type
arguments as expressions, breaking node-for-node parity.
new/make selector, unary, and parenthesized arguments now
relabel to the C grammar's type shapes. Byte spans and tree
structure are preserved. A composite-literal guard suite locks the
boundary: this fix does not touch composite-literal type positions,
which already matched.StatelessExternalScanner interface, in language.go, lets a
scanner declare itself stateless. GoExternalScanner now implements
it, under five documented proof obligations that block cross-token
state from leaking into reuse boundaries. A new
ReuseRejectScannerUnquiescent counter, on IncrementalParseProfile,
tracks boundaries the classifier rejects. An adversarial oracle
sweep proves byte-identical incremental and fresh Go parses across
newlines, raw strings, and comments; the classifier never blocks Go
reuse on that sweep. This change is behavior-neutral groundwork: it
does not itself change any parse output.go test run. A determinism check
runs fresh parsers on identical inputs and asserts the counters
match exactly. A manual-dispatch CI job covers the slower 137KB and
1MB tiers.MISSING
alternation patterns, and D8 #is? predicates now match the oracle
under committed tests. D3 supertype patterns and D5 quantified
captures are tracked, not fixed: their tests are skip-guarded, with
the query-engine-scope limitation documented inline.BlockSpliceSteps profiling counter tracks
block-splice activations. On a clean-Go, near-top, single-byte
insert, a 1MB file measures about 148ms on the prior release and
about 82-88ms on this one. CSS near-top edits re-lex only 2 tokens.
Honest note: the campaign's 60ms target for the 1MB fixture is not
met. The residual cost is dominated by O(nodes) result
materialization outside the splice path — the Go-compatibility
normalization walk, EOF result-selection, and incremental arena
zeroing. Threading the edited range through that walk is the
tracked next lever.ParseIncremental's reuse scope, and
document the grammargen real-corpus parity floor (PR #404).codex/glr-structure-before-score. This release's arrow-return-type
fix (PR #409) is a third source-heuristic detector, not the
structural cure.Nothing published for this version
Swift's certified runtime profile now attaches again. PR #396's swift.bin regeneration (the DFA-minimization fix, v0.44.0) did not update the profile'
swift.bin regeneration (the DFA-minimization fix, v0.44.0) did not
update the profile's pinned blob digest in
grammars/runtime_profiles.go. The stale digest silently dropped
Swift's external-scanner skip-repeat policy and its accepted-error
retry-skip policy (PR #400). The impact was performance-only.
Error-bearing Swift parses ran redundant retry ladders. Clean Swift
parses, and the v0.44.0 memory win, were unaffected. This release
updates the pinned digest to match the regenerated blob. No other
grammar's profile carries a stale digest.ReuseRejectRootNonLeafChanged now holds at a small constant, 9,
regardless of file size. Node allocations drop 11 to 16 times. A 137KB
near-top insert now takes about 22ms, down from about 47ms. A 1MB file
takes about 162ms, down from about 356ms.swift.bin regeneration (the DFA-minimization fix, v0.44.0) did not
update the profile's pinned blob digest in
grammars/runtime_profiles.go. The stale digest silently dropped
Swift's external-scanner skip-repeat policy and its accepted-error
retry-skip policy (PR #400). The impact was performance-only.
Error-bearing Swift parses ran redundant retry ladders. Clean Swift
parses, and the v0.44.0 memory win, were unaffected. This release
updates the pinned digest to match the regenerated blob. No other
grammar's profile carries a stale digest.O(edit) claim: length- or point-changing Tree.Edit calls
still maintain coordinates through affected trailing sibling subtrees.
Before dispatch reaches the reuse check, the parser now applies any
pending eager-default reduce chain to the live stack.
This is campaign O(edit) workstream W1b (PR #398), and it closes the
settling gap that blocked the W1 splice (PR #395) for Go.
ReuseRejectRootNonLeafChanged now holds at a small constant, 9,
regardless of file size. Node allocations drop 11 to 16 times. A 137KB
near-top insert now takes about 22ms, down from about 47ms. A 1MB file
takes about 162ms, down from about 356ms.Swift's `Language()` call no longer exceeds the 256 MB CI memory ceiling. This closes the known issue noted in v0.43.1. grammargen's buildLexDFA rebui
Swift's Language() call no longer exceeds the 256 MB CI memory
ceiling. This closes the known issue noted in v0.43.1. grammargen's
buildLexDFA rebuilt an independent lexer DFA per lex mode, with no
sharing across modes. Swift's about 331 lex modes each rebuilt the same
about 190-state identifier, operator, and comment automaton from scratch.
A new post-construction minimization pass, grammargen/dfa_minimize.go,
merges observationally-equivalent DFA states across lex-mode boundaries
(PR #396). Swift's LexStates table drops from 63,150 to 2,067 entries.
Its Language() call now retains about 25 MB, down from about 490 MB.
swift.bin is regenerated and recertified against the Swift regression
suite and corpus, shrinking from 7,474,360 to 373,401 bytes. Byte-identical
lexing is proven across a 10-grammar parity corpus. The blob format is
unchanged. The known-exception entry for Swift is removed from the CI
memory-ceiling gate.
grammargen's C code emitter had several defects. This release fixes:
A new C-runtime parity harness compiles the emitted parser.c against the
tree-sitter v0.25.0 runtime (PR #391). It byte-compares the resulting AST
against the pure-Go oracle.
Incremental memo-cache growth is now input-deterministic. Growth used
to depend on prior parser history, not only the current parse. Identical
(source, edit) pairs could take different growth paths depending on
earlier use. A new adaptive trigger, driven by the cNodeMemoThrash
collision count of the current parse alone, now controls growth (PR #392,
issue #380 follow-up). Clean, non-pathological parses still stay at the
small 128-entry default.
Incremental reuse is now barred for trees built by the phase-zero compact parser. This closes reuse holes on three entry points:
ParseIncremental now forces a full fresh parse when the old tree is
compact-materialized (PR #393). A new top-down ParseState table-replay
mechanism reconstructs parser states over the full compact derivation. It
runs before hidden-node elision and grammar aliasing. It falls back to a
sentinel state when a state cannot be reliably reconstructed, for example
for extra or comment leaves.
rootNonLeafChanged
rejections near the top of the tree drop from 1,379 to 14. Node reuse
rises from 63.8% to 99.5%. Go incremental node reuse does not improve in
this release. A deeper, pre-existing engine gap blocks it: the reuse check
runs before the eager reduce chain settles state. Work on that gap
continues.GTS_GRAMMARGEN_DISABLE_LEX_MINIMIZE
environment flag falls back to the raw, per-mode lexer tables. Use it only
if a correctness question comes up (PR #396).Nothing published for this version
TypeScript/TSX default-parameter parse fix, plus grammar-decode memory improvements and new CI diagnostics.
TypeScript/TSX default-parameter parse fix, plus grammar-decode memory improvements and new CI diagnostics.
function f(a = 1) {}) no longer collapse to ERROR. The fix widens the GLR merge budget when a default-parameter shape is present, covering plain, array-element ([a = 1]), renamed-property ({a: b = 1}), unicode-identifier, and comment-adjacent forms, in both TypeScript and TSX (PR #389). Root cause: the cap-one merge budget discarded the correct derivation by score before any structural comparison.const [a = 1] = arr) now parse correctly — incidental coverage from the same fix.Language() load above 256 MB. Swift is a documented exception.Language() call still retains about 491 MB. The root cause is upstream in grammargen (the lexer DFA rebuilds once per lex mode). A full fix is tracked.Full changelog: https://github.com/odvcencio/gotreesitter/blob/main/CHANGELOG.md
function f(a = 1) {}) no
longer collapse to ERROR. The fix widens the GLR merge budget when a
default-parameter shape is present. It covers plain, array-element
([a = 1]), renamed-property ({a: b = 1}), unicode-identifier, and
comment-adjacent forms, in both TypeScript and TSX (PR #389). The root
cause: the cap-one merge budget discarded the correct derivation by score
before any structural comparison.const [a = 1] = arr) now parse
correctly. This fix is incidental coverage from the same change.Language() load above 256 MB. Swift is a documented exception.Language() call still retains about 491 MB. The root cause is
upstream in grammargen: the lexer DFA rebuilds once per lex mode. A full
fix is tracked.Incremental correctness hardening + a new default-on correctness gate, plus targeted parity fixes.
Incremental correctness hardening + a new default-on correctness gate, plus targeted parity fixes.
HasError()==false).new(T)/make(T) sole bare-identifier argument retags to type_identifier — a targeted partial fix (qualified/pointer/parenthesized type args still differ from C; tracked).ParseIncremental == fresh Parse across a curated corpus wherever the fresh parse is clean, turning silent incremental corruption into CI failures.Full changelog: https://github.com/odvcencio/gotreesitter/blob/main/CHANGELOG.md
new(T)/make(T) now retags a sole bare-identifier argument to
type_identifier, matching the locked C oracle for that shape. This is a
targeted partial fix: qualified (new(pkg.Type)), pointer (new(*T)),
and parenthesized type arguments still differ from C and require a
parser-table-level fix (tracked).ParseIncremental is structurally identical to a fresh Parse
wherever the fresh parse is genuinely clean — turning previously-silent
incremental corruption into explicit CI failures. Cleanliness is checked by a
recursive IsError()/IsMissing() walk (not HasError()), governed by a
tracked allowlist with a staleness ratchet.v0.42.0 banks the latest authenticated parser-efficiency tranche while preserving 206/206 grammar parity.
v0.42.0 banks the latest authenticated parser-efficiency tranche while preserving 206/206 grammar parity.
Highlights:
Scoped receipts include a 4.19% equal-fixture geomean improvement in compact canonical parse plus public-node materialization, 24.62% and 40.99% aggregate wall-time reductions in the certified Crystal and Matlab retry corpora, and a 4.01% selected-store geomean improvement from the refreshed PGO profile versus the previous profile. The existing production PGO workload remains statistically indistinguishable.
The compact selected-store measurements remain diagnostic and are not presented as public Parser.Parse throughput. See the changelog for exact gates, corpus sizes, oracle relations, and caveats.
BenchmarkDiagnosticParserCoreCanonicalTotal lane—compact
canonical parsing plus public-node materialization—improves by 4.19% by
equal-fixture geomean, with every fixture 3.73-5.28% faster, unchanged
allocations, exact work and deep-tree digests, and zero fallback. The route
remains build-tagged and diagnostic-only.Language.WantsForest, recovery, incremental, and direct
forest experiments remain available.c6de0991, the locked 2,380-file Crystal corpus preserves
every deep tree and C admission relation, reduces attempts from 13,445 to
8,120, lowers aggregate parse wall time by 24.62%, and lowers allocated bytes
by 10.19%. On the locked 1,434-file Matlab corpus, attempts fall from 7,866 to
4,650, wall time by 40.99%, and allocated bytes by 32.67%, again with exact
output and oracle relation preservation on every file.Query.Execute control preserves wall time while reducing
B/op and allocations by 14.50%; direct streaming-cursor allocations remain
unchanged. The selected route remains diagnostic-only.Language.WantsForest experiments remain available for all
three while route overhead and Erlang result selection are improved.GoTreesitter v0.41.0 banks the accumulated correctness, tooling, and performance work since the v0.40.0 tag.
GoTreesitter v0.41.0 banks the accumulated correctness, tooling, and performance work since the v0.40.0 tag.
Highlights:
The compact-parser result remains diagnostic rather than a public Parser.Parse claim. The public fresh materialized production baseline remains documented separately in BENCH.md.
See the v0.41.0 changelog and benchmark receipts for the full support boundaries and authenticated artifact hashes.
query_compile candidate improves total time by 2.51%
with unchanged parser work, bytes, and allocations. The compact route
remains build-tagged and diagnostic-only.MISSING patterns now test missing nodes, and inert #is?/#is-not?
properties are available through public metadata accessors. Descendant range
walks now match upstream behavior for reversed ranges and zero-width missing
children.Add a bounded, build-tagged parser trace that separates lookup cells from execution-time cell reconstruction and retains whole-parse aggregates after its chronological event prefix fills. Scanner checkpoints bind their cached state to the current event token span and remain distinct from unavailable state after relexing. Collision keys have explicit memory caps; reaching a cap exposes unaudited counts, marks the audit incomplete, and blocks claims that require complete collision evidence. A base-pinned content manifest and fail-closed paired receipt identify which production, compact, and locked-C observations can actually be compared. Observer equality and untagged assembly tests keep the trace diagnostic-only.
Add the four-fixture authenticated Go/static-C work-count board with direct counters at their exact hook boundaries, Go-only representation rows marked incomparable, and missing mandatory instrumentation reported separately from out-of-band work-ratio audit findings.
Add the build-tagged compact parser-core candidate and a work-board backend
that authenticates its exact EOF acceptance, selected tree digest, ranges,
fields, selected-node census, and repeat-identical work counts on four locked
real-Go fixtures. The candidate remains diagnostic-only and fail-closed: its
materializer does not preserve ParseState or PreGotoState, so this
admission is not a production-routing, incremental, recovery, or exact public
node-API compatibility claim.
Add a bounded, build-tagged selected-occurrence capability for the compact parser candidate. It preserves repeated physical occurrences, construction states, and checked subtree spans without copying the observer proof; its borrowed immutable windows allow read-only re-entry and block lifecycle mutation until released. Exact admissions and isolated race coverage remain green, with no measured performance-regression claim.
Bank a paired quiet-host receipt against the locked static -O2 C oracle.
At the exact post-fusion revision, public Parser.Parse measures 4.813350x C
by equal-fixture geomean and 5.419730x C by fixed-suite sum of medians. The
build-tagged compact candidate measures 3.847233x C and 3.988613x C,
respectively, with a 4.018193x worst fixture and zero fallback in every timed
sample. These branch-only candidate numbers apply only to its authenticated
clean fresh-full surface; they do not replace the public parser claim.
Fuse nested transaction checkpoints across the build-tagged compact scheduler while preserving standalone rollback and capability semantics. The authenticated four-fixture Total geomean improves by 8.25%, every fixture improves by 7.21-8.96%, and allocation counts remain unchanged.
Add a versioned, locked incremental admission matrix that separates identity, leaf-validation, real-code GLR, recovery, and stateful-scanner behavior using runtime evidence. It rejects full-parse fallback, authenticates both edit directions against fresh Go and C trees, and atomically publishes a machine-readable closure receipt only after every row passes.
Real-corpus grammar parity can use a durable configurable corpus root and split-grammar corpus layouts without silently losing colliding basenames. Eligible-sample caps now apply on every generated-result path, committed floors reject over-cap rows, and the aggressive runner and floor share the same 30-sample limit.
A byte-identical performance release, plus a security guard and an incremental-correctness fix. Every performance change is verified byte-for-byte ide
A byte-identical performance release, plus a security guard and an incremental-correctness fix. Every performance change is verified byte-for-byte identical to the C tree-sitter oracle across the 206-grammar parity suite.
On the forest-path grammars (C#, Bash, CMake) these compound to roughly a 30% wall-clock reduction with ~95% less allocation:
runtime.duffcopy per compare); ~14% wall-clock.-All quantifier matchers now charge a per-execution work budget, bounding worst-case combinatorial blow-up on adversarial query/source pairs. Surfaced via Cursor.DidExceedMatchLimit, configurable with SetMatchWorkBudget (default 1,000,000).ERROR nodes on common edits such as deleting the whitespace between two identifiers (e.g. Clojure (a b) → (ab)). Verified byte-identical to a fresh parse across the C-oracle incremental parity harness.javascript/jquery.js under the non-default GTS_FOREST_INCR=1 mode.The v0.39.0 authenticated cross-suite receipt remains the published performance baseline; a re-measured v0.40.0 receipt is pending.
Full changelog: https://github.com/odvcencio/gotreesitter/compare/v0.39.0...v0.40.0
pgo/default.pgo) and a repdriver
tool; the parity_report build compiles with it. About 7% wall-clock
reduction, byte-identical across all 206 grammars.runtime.duffcopy calls per compare. About 14%
wall-clock reduction on the forest-path grammars, byte-identical.-All quantifier matchers now charge a
per-execution work budget, bounding worst-case combinatorial blow-up on
adversarial query/source pairs. Exposed via Cursor.DidExceedMatchLimit and
configurable with SetMatchWorkBudget (default 1,000,000).ERROR nodes on common edits such as deleting the whitespace between two
identifiers (e.g. Clojure (a b) → (ab)). Verified byte-identical to a
fresh parse across the C-oracle incremental parity harness.2c702656 parser receipt as the v0.39.0
production-code baseline rather than implying that its revision is current
main after the documentation-only release commits.v0.39.0 tightens query, tree, DFA, grammar-import, generated-C, and highlight behavior against the locked runtime contracts. It also adds a locked inc
v0.39.0 tightens query, tree, DFA, grammar-import, generated-C, and highlight behavior against the locked runtime contracts. It also adds a locked incremental admission matrix, stronger parser work-count receipts, and reproducible real-corpus controls for durable and split-grammar layouts.
The authenticated production receipt records public Parser.Parse at 4.886056x the locked static -O2 C oracle by equal-fixture geomean, 5.517602x by fixed-suite sum of medians, and 5.648204x on the worst canonical fixture. The incremental matrix is a correctness and work-classification receipt; it does not publish a representative comparative speed headline.
The 206-grammar curated parity milestone remains banked. See CHANGELOG.md for the complete change list and receipt details.
Correctness-and-evidence release. Query ranges, literals, missing-node patterns,
property metadata, highlight inheritance, lazy tree finalization, DFA EOF
seeking, grammar imports, and generated C metadata now match their locked
contracts more closely. Locked incremental and work-count receipts authenticate
the exercised behavior, while durable corpus roots, split-grammar layouts, and
bounded floors make real-corpus checks reproducible. The authenticated
production receipt at 2c702656 measures public Parser.Parse at 4.886056x C
by equal-fixture geomean, 5.517602x C by fixed-suite sum, and 5.648204x C on the
worst fixture against the locked static -O2 C oracle.
MISSING patterns now test missing nodes, and inert #is?/#is-not?
properties are available through public metadata accessors. Descendant range
walks now match upstream behavior for reversed ranges and zero-width missing
children.-O2 C oracle. At the v0.39.0 production-code baseline 2c702656,
public Parser.Parse measures 4.886056x C by equal-fixture geomean and
5.517602x C by fixed-suite sum of medians, with a 5.648204x worst fixture.v0.38.0 strengthens incremental parsing correctness across GLR reuse, scoring, culling, and retry selection; corrects terminal materialization stop re
v0.38.0 strengthens incremental parsing correctness across GLR reuse, scoring, culling, and retry selection; corrects terminal materialization stop reporting and multiline edit coordinates; and reduces full-parse overhead with evidence-gated unequal-score merge rejection and exact-profile Odin arena sizing.
The release also hardens authenticated static-C fleet baselines, work-count and convergence diagnostics, and forest-route confirmations. The 206-grammar curated parity milestone remains banked. The first strict materialized real-Go publication receipt, shipped with v0.37.0, measured 5.481673x C by equal-fixture geomean and 6.313799x C for the fixed-suite sum of medians; v0.38.0 does not claim a replacement suite-wide ratio.
See CHANGELOG.md for the complete change list and receipts.
Incremental-correctness, full-parse-efficiency, and benchmark-hardening release. Incremental parsing now preserves fresh-parse selection across GLR reuse, score, cull, and retry edges; terminal materialization stops and multiline edits report accurately; evidence-gated arena and merge policies reduce full-parse cost; and authenticated static-C, fleet, and forest measurements are stricter.
incremental_parse_full_retry
reporting on grammars whose intended trees contain ERROR productions and
legitimately use the full GLR width.Tree.ParseStopReason instead of accepted. Previously such a parse could
return a sentinel full-span ERROR root labeled as a successful parse.no_static_c_oracle, no_corpus, and no_corpus_files shards as fatal
closure findings in the combined artifact. Certification remains fail-closed,
and report mode still rejects untyped, contradictory, or mixed oracle
evidence.query_compile fixture. A separate ordinary untagged Go
child performs admission before tagged Go and fully static C diagnostic
children report saturating direct action/pop/selected-tree counters and
explicitly labeled representation proxies. Go counters attribute each
parseInternal attempt to a logical retry rung, resolved cap mode, parser
loop, and finalization; accept_actions is explicitly an action count, and
aggregate counters must equal attempts plus the outside-attempt residual.
Frozen retry-active and straight-LR witnesses pin the attribution semantics;
a Go-only v3 supplement now records a bounded, attempt-local convergence
frontier across reduction selection, post-reduce packing, boundary merge and
cull, pending work, terminal acceptance, packed-root expansion, and final
selection. It retains the first 256 events plus first rejection evidence,
uses attempt-local decision IDs for target/candidate pairs, records scanner
checkpoint identity at the current token election, detects partial merge
mutations from exact semantic GSS writes, separates saturation from
truncation, serializes no pointer identities, and
leaves the shared v2 Go/static-C counter semantics unchanged. Authenticated
v4 receipts bind both manifests and fail closed on malformed convergence
payloads.
Authoritative receipts require a clean Git source identity; compile from
sealed private Go and C input snapshots; bind sanitized build/runtime
environments; independently verify fixture, grammar, GLR-regime, span, and
deep-tree identities; contain the complete cold static-C admission plus all
repository, compiler, linker, identity, and linkage-verifier descendants in
wall-bounded process groups; and publish atomically only after all rechecks
pass.() or (void) parameter spelling, restoring artifact
construction for SCSS while rejecting genuinely parameterized near misses.Nothing published for this version
Nothing published for this version
GoTreesitter v0.37.0 banks the corrected full-parse measurement foundation and the first authenticated forest routes while preserving the 206-grammar
GoTreesitter v0.37.0 banks the corrected full-parse measurement foundation and the first authenticated forest routes while preserving the 206-grammar curated structural-parity milestone.
Highlights:
All 206 curated grammar parity lanes remain banked.
Full-parse benchmark-integrity, forest-certification, and GLR-performance release. Publication now uses one locked static C oracle and authenticated, forking real-Go fixtures; authenticated C-first fleet evidence gates automatic forest routes; general multi-stack work is reduced; and high-level highlight and tag parsing can be bounded. The 206-grammar curated structural-parity milestone remains banked.
ErrParseStoppedEarly while skipping query execution.ParseForestExperimental now reports only a tree produced by the
experimental forest parser. A forest decline returns nil, false with
ForestDeclineInfo diagnostics instead of silently substituting a
production-parser result, so callers can measure and certify forest routing
without mistaking fallback work for a forest success..gts-extracted/<language> directory; tracked changes and untracked files
elsewhere still fail authentication. The production lane separately times
and verifies the actual forest-enabled automatic route on every file, so
promotion requires exact routed parity and a net wall-time improvement after
production fallbacks, not merely a fast forest attempt.no_forest_coverage when a
complete authenticated C-oracle shard declines every file without timing
out. The reducer skips the potentially expensive production lane for that
non-promotable class while leaving missing and timeout-ambiguous evidence
incomplete.go.mod. This lets authenticated manifests
cover every lock entry that has an eligible source while keeping explicit
lock matchers authoritative.Automatic forest routing now covers the exact checked-in AWK, KDL, and Uxntal grammar artifacts after authenticated corpus gates found zero forest/C-oracle divergence on accepted forest files, zero routed/production divergence on every file, and an aggregate route wall-time win. The opt-in is attached through blob-identity runtime profiles, so same-name custom and adapted grammars remain on the conservative production path.
Multi-stack DFA token elections now scan each unique active parser state once and reuse that result while scoring candidates, instead of rescanning the state for every candidate. The authenticated real-Go matrix avoided 80-84% of those repeated scans and improved full parse by 3.5-9.8% across four fixtures, with unchanged parser shape, arena bytes, allocations, and exact 25/25 strict Go parity.
GLR merge, hashing, shape, equivalence, and recovery-trace helpers now pass stack descriptors by pointer instead of repeatedly copying the 104-byte values. The authenticated real-Go matrix improved by 3.54% geomean, with every fixture improved or statistically unchanged and identical arena, token, stack, iteration, node, depth, and normalization counters.
Fresh full parses now share the parser's existing no-error-payload proof with
GSS merge and C-recovery cost selection, avoiding recursive graph and subtree
walks until an ERROR, MISSING, or inherited error is actually
constructed. Paired runs of a 148 KiB clean Java witness improved by 43-47%
with unchanged full-span acceptance; isolated Go, Python, and Swift corpus
parity remained exact, and incremental/reuse parses retain the conservative
path.
Conflict-reduction frontiers now reuse one fixed-table lookup when reading
and updating the forked and seen flags for a reduction key. Paired runs
of a 707 KiB clean Dart witness improved by a further 6-13%, with fresh and
incremental C parity unchanged.
Automatic forest dispatch for the exact built-in JavaScript grammar now limits the speculative forest phase to 128 MiB while preserving the caller's full budget for the production fallback and for explicit forest parsing. A 20,784-file locked-corpus comparison preserved every tree, byte range, span, error, and stop outcome while reducing aggregate parse time by 3.09%, allocated bytes by 2.96%, and peak RSS by 19.02%. Caller-provided, modified, and same-name grammars retain the existing full-budget behavior.
.gitattributes rule makes Git report a fresh
clone as modified, while continuing to reject real byte, mode, and untracked
changes.-O2 C artifact, and times
immutable, clean, forking real-Go fixtures with symmetric tree lifecycles.
The generated 500-function source remains a straight-LR regression control;
its former 1.895x headline and 29% materialization decomposition are
withdrawn because the C lane used a different grammar and the source never
exercised the multi-stack path. A checked-in strict receipt driver now
reproduces the pinned-core Go-C-C-Go schedule; both C transports reject dirty
pinned-source caches, and the static lane snapshots each input once before
identity, parity, and timing checks. The first complete publication receipt
establishes the corrected full-parse baseline at 5.481673x C by equal-fixture
geomean and 6.313799x C for the fixed-suite sum of medians, with per-fixture
ratios from 4.639849x to 6.513909x.Nothing published for this version
Nothing published for this version
Corrected cumulative release from the current main line. This release supersedes v0.35.0, whose tag was published from incomplete ancestry; all three
Corrected cumulative release from the current main line. This release supersedes v0.35.0, whose tag was published from incomplete ancestry; all three browser-runtime changes from that tag are reconciled here without rewriting the published Go module version.
Highlights:
Attached Go-language TinyGo bundle:
ded4dc4c37e0232ec8cfb5cbaf4245bf55974ac80fe165a4eb9664e08fdf3145cd2399ec5fcccdb56299dae15f034cc41d4579d5d737f6585d2438545dfe9728See CHANGELOG.md for complete measurements and validation scope.
Parser recovery, recurring-work, grammar-contract, and browser-runtime release. C-recovery elections and retained memo invalidation reduce fixed overhead; retry selection and generated-language provenance are stricter; and the browser runtime gains persistent incremental documents plus reproducible selected- language bundles for Go and TinyGo.
This release supersedes v0.35.0. That tag was published from incomplete ancestry; its browser-runtime changes have been reconciled here with every change on the current main line. The v0.35.0 tag remains immutable so existing Go module downloads continue to identify one source revision.
open, update, close, and queryDocument. Updates compute a
surrogate-safe minimal edit, reuse the prior parse tree, and run highlights,
tags, and bounded queries over the same retained tree while leaving the
existing stateless parse, query, and highlight APIs intact.cmd/wasmassets now emits reproducible single-language browser bundles for
either the Go or TinyGo WebAssembly compiler. Bundles contain the external
grammar blob, highlight and optional tags queries, the matching compiler
bootstrap, and a manifest with compiler identity and SHA-256 digests; the
runtime build is restricted to the selected grammar's tables, registry, and
scanner support instead of embedding the full grammar fleet.syscall/js.ValueOf path while
preserving the richer structured-tree and bounded-query wire formats.REAL_CORPUS_ONLY, allowing a
reproducible single-language run without switching to a different wrapper.grammargen emit go command without LR splitting.⚠️ Superseded: use [v0.36.0](https://github.com/odvcencio/gotreesitter/releases/tag/v0.36.0).
⚠️ Superseded: use v0.36.0.
This tag was published from incomplete branch ancestry and omits changes already present on the project main line. It remains immutable because published Go module versions must continue to identify one source revision; deleting and reusing the version could cause checksum-authentication failures for consumers.
The persistent browser-document, UTF-16 analysis, query, highlight, tag, and bundle work originally staged here has been reconciled onto current main and released in v0.36.0.
The original v0.35.0 WASM asset is retained only for release provenance:
97377851baaebb9d28091cff06b81c429f7a0179932805064a50ac1886ec3926Nothing published for this version
Forest-routing performance and compatibility-hygiene release.
Forest-routing performance and compatibility-hygiene release.
Highlights:
See the changelog for the complete measured receipts.
Forest-routing performance and compatibility-hygiene release. Automatic dispatch now avoids five language paths that consistently discarded their forest result, while confirmed-dead C, C++, and Rust compatibility walks are removed after full-corpus verification.
_top_level_item node
before cutting; none found, including on the truncated/error-inducing
corpus phase). Zero rewrites were observed across every corpus file in both
phases for all five passes. The fused walk itself remains — its builtin
primitive-type-identifier promotion and preprocessor newline-span extension
handlers are confirmed live and unaffected. normalizeCTranslationUnitRoot
and the typedef-struct error-recovery branch remain untouched pending their
own repros. Net ~575 lines removed from parser_result_c.go (~944
including pruned dead-pass-only tests); verified byte-identical
(S-expression and span hashes) across the entire c and cpp corpora (1,045
files), and both the root package's production-backed
BenchmarkCPPConditionClauseAmbiguityDFA and the grammars package's
BenchmarkParse_C show a statistically significant ~13-27% drop in parse
time and 26-50% drop in allocations per parse from dropping the two
full-tree walks.parser_result_rust_recovery.go), a full-tree walk gated on the source
containing true, false, .., or ; — a gate that opens on essentially
every real Rust file. A full-corpus re-verification (all 37,127 .rs files
under the rust corpus, parsed both clean and truncated to 55% on every
second file — 55,691 parses total) recorded 130,018 gate fires and zero
rewrites. The companion candidate, Rust's dot-range-expressions walk, was
re-verified the same way and found live (3,030 real rewrites on the same
corpus, the simplest case being a bare .. full-range slice index such as
s[..]) and is therefore kept untouched. Net 228 lines removed; verified
byte-identical (S-expression and full node-span dumps) on 30 real Rust
files spanning size and content (macro-heavy, ..-heavy), with the Rust
parity suite, including the dot-range-motivated weird-expressions fixture,
unaffected.Nothing published for this version
v0.33.0 banks the accumulated recurring-parser, recovery-allocation, certified C# compatibility, arena-retention, browser-WASM lifecycle, and compatib
v0.33.0 banks the accumulated recurring-parser, recovery-allocation, certified C# compatibility, arena-retention, browser-WASM lifecycle, and compatibility-cleanup work. Highlights include stable forest-decline memoization, removal of CSV failed default forest speculation, and a 28.4% C++ recovery-witness speedup with 79.9% fewer allocated bytes. Full evidence and compatibility notes are in CHANGELOG.md.
Full Changelog: https://github.com/odvcencio/gotreesitter/compare/v0.32.0...v0.33.0
Recurring parser and forest performance, recovery allocation, compatibility, and lifecycle-hygiene release. Warm parsers avoid repeated stable forest declines and oversized runtime-record copies, missing-shift recovery reuses parser-state chains, exact bundled C# blobs skip redundant post-parse work, arena and browser-WASM lifetimes are tightened, and confirmed-dead compatibility code is removed.
Tree.ParseRuntime() remains a value API with its live
final-child-counter overlay unchanged. In pinned recurring benchmarks this
reduced the five-byte KDL floor by 11.2% and Java's registered token-source
path by 14.9%, with unchanged bytes and allocations per operation; the
standard full/incremental benchmark trio remained neutral.notnull constraints, Unicode identifier spans, scoped-lambda statements and
blocks, and LINQ query expressions, allowing the runtime to skip the five
corresponding post-parse passes for that certified blob. The implementations
remain quarantined conservative fallbacks for legacy blobs, grammargen output,
caller-built languages, and overrides unless those artifacts explicitly carry
the relevant append-only capability bits. Runtime-profile attachment remains
pinned to the exact blob SHA; attaching scanner support by name alone does not
certify native result shapes. The skip is backed by the 1,700-file C# corpus
sweep, the original motivating fixtures, an 84-program LINQ battery, explicit
capability round-trip and identity gates, and direct embedded-grammar Unicode,
scoped-lambda, and LINQ regressions.Release now clear every matching stale
checkout reference from the pool's unused backing slots instead of remaining
reachable after rejection. Ordinary checkout and successful repooling remain
unchanged.truncated only when the 20,000-node
payload limit actually omits a node rather than when a tree exactly fills it.
Empty sources now return stable empty results from both bridges instead of
dereferencing a nil root; unexpected nil parse results and language handles
now fail safely at the browser boundary..,
whose sole job was synthesizing the anonymous . child under an
already-childless dot import-alias node — the DFA emits that child
directly on every real parse, so the walk visited every node in the tree
without ever performing its one rewrite; Java's entire compat block
(primitive-type token collapse, dotted-assignment-declaration reshape, and
recovered-program-root retagging — parser_result_java.go in full); Ruby's
then-span start walk; and three of Haskell's seven compat passes
(collapsed named-leaf children, let-bound local-binds start, and
quasiquote start). Zero rewrites were observed across every corpus file in
both phases despite substantial visit counts (Java's primitive-type check
alone matched 82,504 times). Haskell's remaining four passes — including
normalizeHaskellRootImportField, which rewrites on nearly every parse —
and Ruby's top-level module-bounds fixup, which fires on truncated input,
are unaffected and untouched. Net ~886 lines removed; verified
byte-identical (S-expression and span hashes) on real Go, Java, Ruby, and
Haskell samples, and a benchmark variant of the canonical Go parse
benchmark with a single added period (the synthetic canonical benchmark
source contains no . bytes and so never exercised the removed walk's
gate either way) shows a statistically significant ~37% drop in
allocations per parse from dropping the walk.Nothing published for this version
Nothing published for this version
v0.32.0 extends the browser-focused WebAssembly runtime with structured parsing and Tree-sitter queries, improves clean-parse C-recovery performance,
v0.32.0 extends the browser-focused WebAssembly runtime with structured parsing and Tree-sitter queries, improves clean-parse C-recovery performance, and turns the committed Bash real-corpus parity floor into an executable witness.
go get github.com/odvcencio/gotreesitter@v0.32.0
See the repository changelog for the complete history and validation details.
Browser query/structured-tree, compatibility cleanup, clean-parse recovery performance, and Bash parity-coverage release. The runtime WASM target now exposes structured parsing and queries with both UTF-8 and UTF-16 spans. Six dead JavaScript/TypeScript rewrites are gone, clean parses avoid recursively re-summing C-recovery subtrees, and Bash's committed real-corpus floor is backed by an executable witness.
loadBlob. Tree nodes and query
captures carry both canonical UTF-8 byte offsets and JavaScript UTF-16
code-unit offsets; node- and match-count limits report when results were
truncated.grammargen/bash_parity_test.go),
mirroring the existing Python witness. Previously the bash entry in the
real_corpus_parity_floors.json v3 floor file (25 eligible / 9 no-error / 6
S-expression / 6 deep) was phantom: the generic real-corpus loop skips any
grammar without a jsonPath/path, and bash had neither and no dedicated
test, so nothing exercised that floor. The new witness grammargen-compiles
the locked tree-sitter-bash grammar and reproduces the floor exactly,
skipping (not failing) when the corpus is not seeded locally. A companion
reducer test pins echo ${x} and echo ${#x} as working controls and
echo ${x:-y} as a self-healing known-defect witness for the underlying
grammargen expansion-suffix table defect.if/while) leaf retype,
empty_statement semicolon retype, existential_type collapse, call-
precedence reshape, and unary- and binary-precedence rotation, plus their
exclusively-owned helpers and an already-unreachable standalone fallback
path from an earlier compat-tier sunset. A census over roughly 23 MB of
real JavaScript/TypeScript/TSX (including undici.js and TypeScript's own
checker.ts, parser.ts, and utilities.ts), the original regression corpus
that added these passes, and independent adversarial precedence chains
found zero rewrites from any of the six; later grammargen table fixes
already produce the correct tree shape directly, so the passes had become
dead weight on every JS/TS/TSX parse. The compat pipeline's two remaining
live fixups (top-level object-literal reinterpretation and trailing-
continue-comment reattachment) and the memory-budget stop-polling on the
surviving walk are unaffected. Net ~1,100 lines removed; verified byte-
identical (S-expression and spans) on real JS, TS, and TSX samples.v0.31.0 tightens memory containment for large ambiguous parses, restores Python real-corpus parity, and strengthens authenticated fleet reporting.
v0.31.0 tightens memory containment for large ambiguous parses, restores Python real-corpus parity, and strengthens authenticated fleet reporting.
Successful-forest timing remained neutral (+1.4%, p=0.142), with a small measured allocation cost (+0.28% B/op and +0.01% allocs/op).
Install with:
go get github.com/odvcencio/gotreesitter@v0.31.0
See the v0.31.0 changelog for the complete change list.
Memory containment, Python parity, and authenticated fleet-reporting release. Failed forest attempts now apply the parser's runtime heap and system memory guard, and discarded forest GSS slab batches no longer remain live behind the retention cap. Python real-corpus S-expression and deep parity return to 25/25 after removal of a misfiring compatibility fold. Fleet reducers can publish valid failing scoreboards while certification remains blocking.
report mode publishes a recomputed PASS or FAIL fleet board
without turning valid failure evidence into a reducer error; the default
certify mode publishes the same artifact before blocking on a combined
FAIL. Exact stored shard gates may be PASS or FAIL, while missing, stale, or
malformed evidence still fails closed.--hostname and records it in run
metadata so one-language containers on the same physical benchmark host can
produce a consistent authenticated host identity.foldPythonTrailingSelfCallIntoNestedFunction, a Python
compat-normalization heuristic that spuriously folded a same-named trailing
call into a preceding nested function's block when that function's body
ended in a dangling ; before a dedent. Raw parser results already matched
the reference; only the post-parse fold diverged. Python real-corpus
S-expression and deep parity both improve from 20/25 to 25/25.Nothing published for this version
v0.30.0 improves recurring-parser performance and makes fleet measurements clean/error-aware, resumable, revision-pinned, and fail-closed.
v0.30.0 improves recurring-parser performance and makes fleet measurements clean/error-aware, resumable, revision-pinned, and fail-closed.
Install with:
go get github.com/odvcencio/gotreesitter@v0.30.0
See the v0.30.0 changelog for the complete change list.
Recurring-parser performance and fleet-measurement integrity release. Reused parsers now invalidate the 16,384-entry clean-zero front cache by epoch, reducing recurring one-byte KDL and JSON wall time by 33.10% and 35.67% with unchanged allocation counts while the primary benchmark trio remains neutral. Certified runtime profiles retain the required D, Groovy, and C# retry policies. The real-corpus tooling now distinguishes clean, error-bearing, and stopped parses and can reduce revision-pinned one-language checkpoints into a single authenticated fleet report without rerunning parsers.
real_corpus_inventory --require-corpus-sources now rejects pinned corpus
checkouts that contain no benchmark-eligible regular files matching the
language's source policy. Inventory and benchmarks share traversal and
subdirectory validation, so invalid paths and scan failures are reported
instead of allowing an empty language sweep to appear complete.v0.29.0 improves recurring parser performance and continues consolidating compatibility behavior into auditable shared mechanisms.
v0.29.0 improves recurring parser performance and continues consolidating compatibility behavior into auditable shared mechanisms.
Install with:
go get github.com/odvcencio/gotreesitter@v0.29.0
See the v0.29.0 changelog for the complete change list.
Recurring-parser performance and compatibility-cleanup release. Repeated small parses now pay for the current input rather than stale pooled capacity, forest parsing returns its token-source resources promptly, and the common small forest indexes stay inline. On the recurring C# and CSS witnesses, wall time falls 34–35% and allocated bytes fall 81–82%; across a selected six-language family, geomean wall time falls 3.18% and bytes fall 6.81%. The primary Go benchmark trio remains neutral while full-parse bytes fall 18.68%.
gssForestIndex and forestAlternativeIndex keep their common small sets in
inline storage and allocate spill space only when needed. Insertion order,
lookup identity, and cache reset semantics are unchanged.trailingSpanRules table
(normalizeResultTrailingSpanCompatibility) instead of six separate
runLanguageResultCompatibility switch arms and four hand-written wrapper
functions (normalizeNimTopLevelCallEnd, normalizeCommentTrailingExtraTrivia,
normalizeRSTTopLevelSectionEnd, normalizeFortranStatementLineBreaks).
Each row names the language, the shared primitive it drives (extend the
sole top-level child across a trailing line break, trim a trailing
invisible extra-trivia child at the root, shrink a top-level child's end
off trailing whitespace, or extend a statement across the line break
before its next sibling), and that primitive's node-kind parameters, so
adding another language to any of these four span shapes is a table row,
not a new function. Fortran's statement-vs-sibling pass is generalized
from a hardcoded program/program_statement walk into
extendChildLineBreakBeforeNextSibling, parameterized the same way.
The four wrapper functions being retired were already thin call-throughs
into shared primitives from an earlier consolidation, so this pass nets a
modest line increase (the switch/wrapper boilerplate shrinks, but the new
table and its per-row rationale comments are larger than the code they
replace) in exchange for one auditable, greppable rule set instead of six
scattered dispatch sites.gomodRepetitionShiftConflictChoice, dartRepetitionShiftConflictChoice,
cRepetitionShiftConflictChoice) are retired in favor of certified,
blob-SHA-pinned ConflictPolicies rows in grammars/runtime_profiles.go.
C's rule recurs at thousands of table rows (reduce-symbol identity alone,
not table position), so it is the first profile to use two new sentinel
values, ConflictPolicyAnyState/ConflictPolicyAnyLookahead, matching
every state/lookahead instead of one exact row. Dot's equivalent helper is
retired outright rather than migrated: it was already dead code in the
shipped dispatch path (dot never opted out of the engine-wide C
repetition-skip fold, which already folds it with a flat parse stack), and
reviving it as a live policy grew the LR parse-stack depth O(n) with
statement count for no fork-count benefit. C#'s helper is left in place: it
depends on the literal source text of a contextual keyword (scoped),
which ConflictPolicies' state/lookahead-symbol matching cannot express.Containment closure and measurement-honesty release.
Containment closure and measurement-honesty release.
Parse of the Poppler witness (3.4 MB ambiguous JavaScript) — a path that previously escaped budget accounting entirely — now stops bounded at ~1.78 GiB peak RSS under the default 512 MiB budget with a graceful full-span error tree, and completes clean under a 2 GiB budget.parse_gap_report/parse_gap_correlate now classify every corpus file clean vs error-bearing and report split ratios (clean_ratio, error_ratio, error_file_share) alongside the combined number, so tail-language ratchet rows stop conflating clean-parse throughput with recovery throughput.Full details in CHANGELOG.md.
Containment closure and measurement-honesty release. The runtime memory
budget is now path-uniform across every public parse construction: the
parse loop, the Go compat walk, and the JS/TS fused compat walk all poll
the same budget and surface the same stop reason. On the quiet host, a
bare Parse of the Poppler witness (3.4 MB ambiguous JavaScript) stops
bounded at ~1.78 GiB peak RSS under the default 512 MiB budget — a path
that previously escaped accounting entirely — and completes clean under a
2 GiB budget. Error-recovery throughput improves ~18% on recovery-heavy
workloads, and the perf ledger tooling learns to separate clean-parse
from error-recovery throughput so tail-language ratchet rows stop
conflating the two.
cNodeErrorCost/cNodeVisibleSubtreeCount) is now a fixed-capacity,
pointer-keyed 2-way set-associative cache instead of a
map[*Node]cNodeMemoEntry: warm CPU profiles of error-bearing parses on
fleet-tail languages (kdl, uxntal) showed runtime.mapaccess2_fast64 as
the single hottest leaf, driven almost entirely by these two lookups.
Every decision made by the recovery cost-competition machinery
(cRecoverStrategy1Election, cHandleError, cCondenseAndResume, etc.)
is unchanged — a cache miss simply falls back to the same full recompute
as before. The cache starts small (matching the old map's practical
per-parse footprint) and grows to its full working-set size only the
first time a parse actually enters C error handling, so clean parses of
recovery-capable grammars are unaffected (measured neutral-to-positive on
the canonical Go workload). A synthetic KDL truncated/garbage-suffix
recovery benchmark (BenchmarkKDLRecoveryGarbageSuffix) improves ~18%
(83.2ms to 68.2ms median, p=0.002, n=6).pointer_light_measurement_test.go,
pointer_light_soa_test.go) that measure bytes-per-node, GC scan
cost, and walk throughput for the current pointer-rich node layout
against a contiguous index-based layout, plus a
constructed-versus-final node census. These are the standing gate
instruments for the frozen-tree store investigation.parse_gap_report and parse_gap_correlate now split each language's
Go/C ratio by corpus-file policy: every sample is classified clean
(Go tree has no ERROR nodes and did not stop early) or error-bearing, and
the per-language ledger reports clean_ratio/error_ratio plus
clean_file_count/error_file_count/error_file_share alongside the
existing combined ratio. This keeps an error-dense tail-language corpus
from making clean-parse throughput look artificially slow in ratchet
decisions.Containment and canonical-parse-lever release.
Containment and canonical-parse-lever release.
Memory containment is now layered: volume-triggered budget polling (a real check fires whenever tracked arena growth exceeds 64 MiB since the last one, bypassing the iteration-count poll mask), budget checks inside the GLR stack-merge survivor loop (the previously unpollable grind window), and a decoupled absolute hard ceiling (GOT_PARSE_MEMORY_HARD_CEILING_MB, default 2048, 0 = off). Runaway parses now stop with ParseStopMemoryBudget at single-digit multiples of the budget instead of ballooning unbounded; the certified Poppler witness still completes full-span under its 2 GiB budget with behavior identical to the prior release (same-host A/B within 0.03% RSS).
Two independent hot-path levers land together:
_statement/_simple_statement wrappers now collapse in the zero-allocation unary reduce path (1,500 wrapper nodes eliminated per canonical-workload parse; regenerated go.bin differs in exactly two table bits).Combined receipt (same host, same pinned core, C baseline re-measured in-session): canonical Go full parse 12.25 ms → 10.91 ms — 2.14x → 1.89x the C runtime — with allocations unchanged (9 per full parse, zero on both incremental lanes). Full methodology and reproduction commands in BENCH.md.
Also in this release: the grammargen field-map generation ceiling is lifted (per-ProductionID dedup removes 60–87% orphaned entries from grammargen blobs; Bash and Dart generate for the first time and carry real-corpus floor rows), dedicated non-terminal alias-map parity coverage for Go/Swift/Caddy, reproducible parity floors seeded from lock-pinned corpora, retirement of the dead Python compat helpers and six test-only compat wrappers, gssNode 64-byte layout compaction with transient GSS slab recycling, a hard zero-cliff gate for nightly fleet sweeps, and BENCH.md as the canonical performance-claims page with pinned quiet-host receipts.
Full details in CHANGELOG.md.
Containment and canonical-parse-lever release. Memory-budget enforcement is now layered (volume-triggered polling, in-merge checks, and an absolute hard ceiling) so runaway parses stop instead of ballooning, while certified bounded-overshoot witnesses still complete. Two independent hot-path levers land together: single-stack raw-shape elision and supertype hidden-choice collapse. Combined same-host receipt on the canonical Go workload: full parse 12.25 ms to 10.91 ms — 2.14x to 1.89x the C runtime measured in the same session — with allocations unchanged (9 per full parse, zero on both incremental lanes). The compat tier continues shrinking, the field-map generation ceiling is lifted (Bash and Dart now carry real-corpus floor rows), and parity floors are reproducible against lock-pinned corpora.
Memory-budget containment is now layered: volume-triggered polling
forces a real budget check whenever tracked arena growth exceeds 64 MiB
since the last check (bypassing the iteration-count poll mask), the GLR
stack-merge survivor loop polls the budget mid-grind, and a decoupled
absolute hard ceiling (GOT_PARSE_MEMORY_HARD_CEILING_MB, default
2048, 0 = off) stops runaway growth regardless of soft-budget
overshoot tolerance. A bare-Parse giant-table witness now stops with
ParseStopMemoryBudget at 2.6-4x budget instead of ballooning; the
Poppler witness still completes full-span under its certified 2 GiB
budget.
A hard zero-cliff gate for nightly fleet perf sweeps, with a hard-gate-only mode on the perf-scan budget checker; the scheduled perf-scan gate is disabled in favor of the nightly hard gate.
Runtime profiles for ASM (bounded stack retries), Haxe, Odin, and SCSS.
Dedicated non-terminal alias-map parity coverage: derivation gates for Go, Swift, and Caddy mirroring the Lua gate, plus live-parse regression tests for each language's alias behaviors.
BENCH.md: the canonical performance-claims page, including the first
pinned quiet-host receipt for the corrected full-parse benchmark and a
same-host C-baseline calibration (full parse 2.14x C on the canonical
workload; incremental lanes orders of magnitude faster than the cgo
binding path).
docs/compat-tier.md documenting the C-faithful result-normalization
tier and its retirement policy.
A reproducible real-corpus floors workflow: corpora seeded at
grammars/languages.lock SHAs (scripts/seed_real_corpus_from_lock.sh
plus a committed seed manifest), opt-in ratchet regeneration, and floor
artifacts captured in the mounted workspace.
resultCollapsedNamedLeafRules table
(previously data-driven for Ruby and Apex only): Kotlin's
identifier -> simple_identifier, Hack's true/false/null literal
wrappers, Dart's super/this, and Elixir's nil are now table rows
instead of hand-written adapter functions. The table gained a bySource
column so a row can pick the source-text-verified matcher
(normalizeCollapsedNamedLeafChildrenBySource, needed when the
collapsed span must be confirmed before a child is attached) instead of
the plain structural one. Hack's dedicated compat file and switch arm
are retired entirely (all three of its rules were table-eligible); Dart
and Elixir keep their compat functions for unrelated rewrites but lose
the adapter that only fired these rules. Net ~37 lines of per-language
adapter code retired in favor of ~7 declarative table rows. Haskell's
wildcard -> "_" was evaluated for the same migration but left
in place: the anonymous token name "_" collides with the special
query-wildcard sentinel in Language.symbolByNameAndNamed/SymbolByName
(both short-circuit to (0, true) for name == "_"), so migrating it
through the shared table resolves the child to Symbol(0) (EOF) instead
of the real anonymous _ token; OCaml, HCL, and Rust were left
unmigrated too (OCaml's and most of HCL's rules need multi-candidate
source disambiguation the one-parent/one-child schema doesn't represent,
and HCL/Rust also fold their collapse checks into a single perf-tuned
tree walk that per-rule table entries would fragment).grammargen's hidden-choice passthrough table no longer excludes supertype
symbols whose alternatives are all neutral-unary; Go's _statement and
_simple_statement wrappers now collapse in the zero-allocation unary
reduce path (1,500 wrapper nodes eliminated per canonical-workload parse).
Only two bits change in the regenerated go.bin — parse tables, field
maps, alias and supertype query tables are byte-identical, and supertype
query predicates match by concrete descendant so observable trees and
captures are unchanged. Canonical quiet-host full parse improves ~3.4%.
Raw-shape capture and content hashing are elided while a parse has only ever had a single GLR stack and has not entered error recovery; capture resumes permanently at the first fork or recovery event. Shape-dependent tie-breaks are unaffected: elided prefix nodes are only ever compared to themselves (structural pointer-sharing), evidenced by forced-descent and recovery differential tests. Canonical quiet-host full parse improves ~4.8% with allocations unchanged (9/0/0 preserved).
gssNode layout compacted to a 64-byte budget on 64-bit targets (pointer-backed extra links with uint8 count/cap, uint32 depth, aggVisValid bool), enforced by a size-budget test and a compile-time uint8 guard; transient GSS slabs are recycled after linear demotion with address-keyed caches invalidated and fingerprinted spine memoization preserved. Canonical quiet-host lanes are timing-neutral with allocations unchanged (9/0/0).
Contiguous recovery cost calculation and recovery stack allocation are optimized; tree error state is cached and compat walk frames reused.
v0.26.1 reduces retained memory after exceptionally large accepted full parses without changing the public API.
v0.26.1 reduces retained memory after exceptionally large accepted full parses without changing the public API.
Full changelog: https://github.com/odvcencio/gotreesitter/compare/v0.26.0...v0.26.1
Large-tree memory follow-up to v0.26.0. Exceptionally large completed full parses can now release arena storage retained by discarded GLR alternatives before returning to the caller. This patch does not change the public API.