Skip to content

build!: bump tree-sitter core v0.25.1 → v0.26.6#51

Open
DeusData wants to merge 1 commit into
tree-sitter:masterfrom
DeusData:bump-core-0.26.6
Open

build!: bump tree-sitter core v0.25.1 → v0.26.6#51
DeusData wants to merge 1 commit into
tree-sitter:masterfrom
DeusData:bump-core-0.26.6

Conversation

@DeusData

Copy link
Copy Markdown

Summary

Update tree-sitter submodule to v0.26.6 and re-vendor lib/src and lib/include via copy.sh.

Breaking changes

Remove deprecated functions that called C APIs removed in tree-sitter 0.26:

  • Parser.TimeoutMicros, Parser.SetTimeoutMicros
  • Parser.CancellationFlag, Parser.SetCancellationFlag
  • Language.Version (use Language.AbiVersion instead)
  • QueryCursor.SetTimeoutMicros, QueryCursor.TimeoutMicros

These were all marked @deprecated with "will be removed in 0.26" and have existing replacements (ParseWithOptions/MatchesWithOptions with ProgressCallback, and Language.AbiVersion respectively).

Other changes

  • Rewrite Parser.ParseCtx to use ParseWithOptions progress callback instead of CancellationFlag (eliminates goroutine and atomic ops)
  • Fix memory leak in ParseWithOptions: pointer.Save(options) had no matching pointer.Unref, leaking per call with non-nil options. Fixed in all four ParseWithOptions variants.
  • Update test fixtures for v0.26 changes:
    • parser_test.go: tree-sitter crate path cli/crates/cli/
    • query_test.go: adjust error caret position (column calculation change)

Not included (follow-up PRs)

New C functions added in v0.26 (ts_point_edit, ts_range_edit, query cursor range methods) are intentionally left unwrapped — they can be added in a follow-up PR to keep this one focused on the core upgrade.

Supersedes

Supersedes #47 (Dependabot submodule-only bump that failed CI because Go bindings were not updated).

Test plan

  • go build ./... — compiles clean
  • go test -race ./... — all tests pass
  • go vet ./... — no warnings
  • Validated in downstream project (full reindex produces identical results)
  • ABI version confirmed unchanged at 15 — all existing grammar bindings compatible

Update tree-sitter submodule to v0.26.6 and re-vendor lib/src and
lib/include via copy.sh.

BREAKING CHANGE: Remove deprecated functions that called C APIs
removed in tree-sitter 0.26:
- Parser.TimeoutMicros, Parser.SetTimeoutMicros
- Parser.CancellationFlag, Parser.SetCancellationFlag
- Language.Version (use Language.AbiVersion instead)
- QueryCursor.SetTimeoutMicros, QueryCursor.TimeoutMicros

These were all marked @deprecated with "will be removed in 0.26"
and have existing replacements (ParseWithOptions/MatchesWithOptions
with ProgressCallback, and Language.AbiVersion respectively).

Rewrite Parser.ParseCtx to use ParseWithOptions progress callback
instead of CancellationFlag (eliminates goroutine and atomic ops).

Fix memory leak in ParseWithOptions: pointer.Save(options) had no
matching pointer.Unref, leaking per call with non-nil options.

Update test fixtures for v0.26 changes:
- parser_test.go: tree-sitter crate path cli/ → crates/cli/
- query_test.go: adjust error caret position (column calc change)

Supersedes tree-sitter#47 (Dependabot submodule-only bump that failed CI
because Go bindings were not updated).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant