Subject: bug#63086: 29.0.90; go-ts-mode treesit-query-error during jit-lock

From: Randy Taylor <[email-masked]>
Date: Wed, 26 Apr 2023 12:38:34 +0000

On Wednesday, April 26th, 2023 at 07:07, Jimmy Wong <[email-masked]> wrote:

> Any go file will trigger this
> On 26 Apr 2023 at 11:35 AM +0100, Eli Zaretskii <[email-masked]>, wrote:
>
>>> From: Jimmy Yuen Ho Wong <[email-masked]>
>>> Date: Wed, 26 Apr 2023 11:00:14 +0100
>>>
>>> After visiting a go file and turning on M-x go-ts-mode, this following
>>> message appears in the *Messages* buffer and the go buffer is not
>>> highlighted as a result.
>>>
>>> QuitError during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Node type error at" 11 "[(false) (iota) (nil) (true)] @font-lock-constant-face (const_declaration (const_spec name: (identifier) @font-lock-constant-face))" "Debug the query with `treesit-query-validate'")
>>> Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error "Node type error at" 11 "[(false) (iota) (nil) (true)] @font-lock-constant-face (const_declaration (const_spec name: (identifier) @font-lock-constant-face))" "Debug the query with `treesit-query-validate'")
>>
>> Can you post a minimal file that triggers this? Or are you saying
>> that any Go file will cause this?
>>
>> Thanks.

I can't reproduce this with any .go files I have laying around. Can you share one that reproduces the issue?

Is the tree-sitter-go shared library file you're using the latest and most up to date one?

What is the version of tree-sitter? If it's not the latest, can you try the latest and see if that helps?

Also, and just to be on the safe side, are you able to reproduce this with emacs -Q?