Repository navigation
fix(gazelle): migrate to official tree-sitter Go bindings - #4272
Merged
aignas merged 4 commits intoOct 16, 2026
Merged
Conversation
Replace the unmaintained `github.com/smacker/go-tree-sitter` dependency with the official `github.com/tree-sitter/go-tree-sitter` and `github.com/tree-sitter/tree-sitter-python` (v0.25.0) modules. This updates the Python grammar so the Gazelle plugin can parse Python 3.14 PEP 758 unparenthesized multi-exception `except` clauses without errors. Because the official bindings include C sources across parent and subdirectory paths that standard `go_repository` Gazelle generation cannot compile directly, fetch both modules via `http_archive` with custom `cc_library` and `go_library` targets in both Bzlmod and WORKSPACE modes. Generated by Gemini. Tested on our large-scale QuantumAI monorepo. Fixes 3416. I hope.
dougthor42
commented
Oct 15, 2026
aignas
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the unmaintained
github.com/smacker/go-tree-sitterdependency with the officialgithub.com/tree-sitter/go-tree-sitterandgithub.com/tree-sitter/tree-sitter-python(v0.25.0) modules. This updates the Python grammar so the Gazelle plugin can parse Python 3.14 PEP 758 unparenthesized multi-exceptionexceptclauses without errors.Because the official bindings include C sources across parent and subdirectory paths that standard
go_repositoryGazelle generation cannot compile directly, fetch both modules viahttp_archivewith customcc_libraryandgo_librarytargets in both Bzlmod and WORKSPACE modes.We also remove unneeded go_repository items from
gazelle/deps.bzl.Generated by Gemini. Tested on our large-scale QuantumAI monorepo.
TAG=agy
Timing
I ran the parent commit and this PR on our primary QuantumAI monorepo. This PR might make things a little faster, but I didn't want to wait for 5 or more runs in hyperfine 😆.
Parent commit:
This PR:
Fixes #3416