Uh oh!
There was an error while loading. Please reload this page.
fix(gazelle): Support parsing files that use Python3.12 PEP 695 (Type Parameter Syntax) by using dougthor42's fork of go-tree-sitter - #2496
Conversation
Nvm, thought this was in the BCR repo. |
aignas
left a comment
There was a problem hiding this comment.
Thanks for adding tests!
Whilst I would prefer it to be in BCR, I understand your desire to also cater for WORKSPACE users.
dougthor42
commented
Dec 13, 2024
I mean, I wouldn't say I desire to cater to WORKSPACE users, haha. If we just dropped WORKSPACE support altogether I'd be super happy but I know that wouldn't go over well with some people. When we do drop WORKSPACE support, then the BCR-based option is indeed the better solution. |
Replaces #2413.
Fixes#2396.
This updates the
go-tree-sitterdependency to use my fork that includesBUILD.bazelfiles. Specifically, theBUILD.bazelfiles in the fork include references to top-level code likearray.hwhich the original Gazelle-generated files forgo-tree-sitterwere 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-sitterinto BCR here. However:array.hand other filessmackerwithdougthor42so thatgo buildworksgo mod edit -replaceto work, so I've just manually updatedgo.modand whatnot everywhere. If someone with more go knowledge has a suggestion I'm happy to hear it.