Skip to content

build(deps): bump github.com/odvcencio/gotreesitter from 0.16.0 to 0.20.9 - #43

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/odvcencio/gotreesitter-0.20.9
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/odvcencio/gotreesitter-0.20.9

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 3, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/odvcencio/gotreesitter from 0.16.0 to 0.20.9.

Release notes

Sourced from github.com/odvcencio/gotreesitter's releases.

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.

Fixed

  • C#: Large C# files whose class body is shredded by a cumulative GLR failure (e.g. Newtonsoft.Json's 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.
  • Swift: the ternary/conditional operator (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.

CI

  • 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.

Looking ahead

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: odvcencio/gotreesitter@v0.20.8...v0.20.9

v0.20.8

Added — consumer-controllable forest parsing

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: odvcencio/gotreesitter@v0.20.7...v0.20.8

v0.20.7

Fixed

  • Parser timeout and cancellation budgets now flow through the parser loop, recovery reparses, result compatibility/finalization, and Go normalization, so strict parses stop consistently instead of continuing unbounded work after the primary parse (#114, #128).
  • F# external-scanner keyword dedent fallback now guards empty indentation stacks for then, and, with, else, elif, and end, preventing scanner panics on malformed or edge-case indentation (#129, #130).
  • Swift 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).

v0.20.6

Patch release for parser recovery correctness, grammargen parity, and the forest/performance workstream merged after v0.20.5.

Added

  • Strict parse variants return 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.

... (truncated)

Changelog

Sourced from github.com/odvcencio/gotreesitter's changelog.

[0.20.9] - 2026-07-02

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.

Fixed

  • Large C# files whose class body is shredded by a cumulative GLR failure (e.g. Newtonsoft.Json's 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).
  • Swift ternary/conditional operator (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).

CI

  • 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.

[0.20.8] - 2026-07-01

Adds consumer-controllable forest parsing.

Added

... (truncated)

Commits
  • e171c3f chore(release): prepare v0.20.9
  • 685ef7f fix(swift): recover the ternary/conditional operator (#135) (#137)
  • ebcc3d9 test: conditionally skip heavyweight recovery parse under -race
  • caeca84 fix(csharp): recover methods from large shredded namespaces (#136) (#138)
  • c8315be chore(release): prepare v0.20.8
  • dcdad9c feat(parser): consumer opt-in forest parsing via Language.WantsForest (#134)
  • b4c15b5 chore(release): prepare v0.20.7
  • e9cf364 fix(grammars): guard F# scanner dedent fallback (#130)
  • 869ba15 Honor parser timeouts during Go result normalization (#128)
  • 27a635e Merge pull request #132 from richardwooding/fix/issue131-swift-else-if-chains
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/odvcencio/gotreesitter](https://github.com/odvcencio/gotreesitter) from 0.16.0 to 0.20.9.
- [Release notes](https://github.com/odvcencio/gotreesitter/releases)
- [Changelog](https://github.com/odvcencio/gotreesitter/blob/v0.20.9/CHANGELOG.md)
- [Commits](odvcencio/gotreesitter@v0.16.0...v0.20.9)

---
updated-dependencies:
- dependency-name: github.com/odvcencio/gotreesitter
  dependency-version: 0.20.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Jul 3, 2026
@dependabot @github

dependabot Bot commented on behalf of github Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #44.

@dependabot dependabot Bot closed this Jul 10, 2026
@dependabot
dependabot Bot deleted the dependabot/go_modules/github.com/odvcencio/gotreesitter-0.20.9 branch July 10, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants