fix(gazelle): Support parsing files that use Python3.12 PEP 695 (Type Parameter Syntax) by using dougthor42's fork of go-tree-sitter #2496
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.
Replaces #2413.
Fixes #2396.
This updates the
go-tree-sitter
dependency to use my fork that includesBUILD.bazel
files. Specifically, theBUILD.bazel
files in the fork include references to top-level code likearray.h
which the original Gazelle-generated files forgo-tree-sitter
were not able to handle. I also include the test cases that @maffoo created in #2413 and verified that they (a) fail before the fix and (b) pass after the fix.The fork is: https://github.com/dougthor42/go-tree-sitter
The branch that includes all changes is: https://github.com/dougthor42/go-tree-sitter/tree/for-rules-python-gazelle-plugin
A couple notes:
go-tree-sitter
into BCR here. However:array.h
and other filessmacker
withdougthor42
so thatgo build
worksgo mod edit -replace
to work, so I've just manually updatedgo.mod
and whatnot everywhere. If someone with more go knowledge has a suggestion I'm happy to hear it.