Skip to content

chore: Switch back to smacker/go-tree-sitter #3069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dougthor42
Copy link
Collaborator

@dougthor42 dougthor42 commented Jul 8, 2025

Finally remove the dougthor42/go-tree-sitter fork, fixing #2630.

Admittedly we could have done this sooner had I figured things
out sooner... but c'est la vie.

Instead of using the BUILD.bazel files in dougthor42/go-tree-sitter,
we basically vendor the build file via http_archive.

This is different than using patches because non-root Bazel modules
can still make use of the BUILD.bazel files we make.

Background:

The reason we migrated to dougthor42/go-tree-sitter in the first
place was to support python 3.12 grammar. smacker/go-tree-sitter
supported for python 3.12, but made a change to their file structure
that Gazelle was unable to handle. Specifically, the
python/binding.go file indirectly requires a c header file found
in a parent directory, and Gazelle doesn't know how to handle that
for go_repository (WORKSPACE) and go_deps.from_file (bzlmod).

So dougthor42/go-tree-sitter created our own BUILD.bazel files
that included the required filegroups and whatnot, thus negating
the need for Gazelle to generate BUILD.bazel files.

Future Work:

This still doesn't resolve the issues with bumping rules_go and go
seen in #2962, but it does simplify that investigation a bit as
it's just one fewer thing to account for. It also doesn't address
the desire to migrate to the official tree-sitter/go-tree-sitter
repo, but @jbedard found some perf issues with that anyway
(tree-sitter/go-tree-sitter#32).

@dougthor42
Copy link
Collaborator Author

Holy shit things passed, yay!

@dougthor42 dougthor42 enabled auto-merge July 8, 2025 16:19
@dougthor42 dougthor42 added this pull request to the merge queue Jul 8, 2025
Merged via the queue into bazel-contrib:main with commit 16c65cf Jul 8, 2025
3 checks passed
@dougthor42 dougthor42 deleted the u/dthor/back-to-smacker-gh2630 branch July 8, 2025 17:16
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy