GNU bug report logs - #64922
treesit-query-error due to a recent change to tree-sitter-cmake grammar definition

Previous Next

Package: emacs;

Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>

Date: Fri, 28 Jul 2023 21:00:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64922 in the body.
You can then email your comments to 64922 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#64922; Package emacs. (Fri, 28 Jul 2023 21:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincenzo Pupillo <v.pupillo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 28 Jul 2023 21:00:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: treesit-query-error due to a recent change to tree-sitter-cmake
 grammar definition
Date: Fri, 28 Jul 2023 22:59:27 +0200
[Message part 1 (text/plain, inline)]
Hi, a recent commit (commit fe9b5e022950d53cb23959b76c240e1da27ff0a5) changed 
the definition of the cmake grammar, now there is a new node argument_list used 
to wrap nodes of type argument. 
This causes the following error:
Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error 
"Structure error at" 19 "((foreach_command ((argument) @font-lock-constant-
face (#match \"\\\\(?:^\\\\(?:I\\\\(?:N\\\\|TEMS\\\\)\\\\|LISTS\\\\|RANGE\\\\|
ZIP_LISTS\\\\)$\\\\)\" @font-lock-constant-face)))) ((if_command ((argument) 
@font-lock-constant-face (#match \"\\\\(?:^\\\\(?:AND\\\\|COMMAND\\\\|DEFINED\
\\\|E\\\\(?:QUAL\\\\|XISTS\\\\)\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\
(?:_EQUAL\\\\)?\\\\|MATCHES\\\\|NOT\\\\|OR\\\\|PATH_EQUAL\\\\|STR\\\\(?:EQUAL\
\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\\|VERSION_\\
\\(?:EQUAL\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\
\)$\\\\)\" @font-lock-constant-face))))" "Debug the query with `treesit-query-
validate'")

The attached patch supports both the old and the new grammar.
Thanks.
Vincenzo
[0001-Updated-CMake-support-due-to-changes-in-tree-sitter-.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64922; Package emacs. (Sat, 29 Jul 2023 07:51:01 GMT) Full text and rfc822 format available.

Message #8 received at 64922 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Vincenzo Pupillo <v.pupillo <at> gmail.com>,
 Theodor Thornhill <theo <at> thornhill.no>, Yuan Fu <casouri <at> gmail.com>
Cc: 64922 <at> debbugs.gnu.org
Subject: Re: bug#64922: treesit-query-error due to a recent change to
 tree-sitter-cmake grammar definition
Date: Sat, 29 Jul 2023 10:51:19 +0300
> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> Date: Fri, 28 Jul 2023 22:59:27 +0200
> 
> Hi, a recent commit (commit fe9b5e022950d53cb23959b76c240e1da27ff0a5) changed 
> the definition of the cmake grammar, now there is a new node argument_list used 
> to wrap nodes of type argument. 
> This causes the following error:
> Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error 
> "Structure error at" 19 "((foreach_command ((argument) @font-lock-constant-
> face (#match \"\\\\(?:^\\\\(?:I\\\\(?:N\\\\|TEMS\\\\)\\\\|LISTS\\\\|RANGE\\\\|
> ZIP_LISTS\\\\)$\\\\)\" @font-lock-constant-face)))) ((if_command ((argument) 
> @font-lock-constant-face (#match \"\\\\(?:^\\\\(?:AND\\\\|COMMAND\\\\|DEFINED\
> \\\|E\\\\(?:QUAL\\\\|XISTS\\\\)\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\
> (?:_EQUAL\\\\)?\\\\|MATCHES\\\\|NOT\\\\|OR\\\\|PATH_EQUAL\\\\|STR\\\\(?:EQUAL\
> \\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\\|VERSION_\\
> \\(?:EQUAL\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\
> \)$\\\\)\" @font-lock-constant-face))))" "Debug the query with `treesit-query-
> validate'")
> 
> The attached patch supports both the old and the new grammar.

Thanks.

Theo, yuan: any comments to the patch?  If okay, I'd like to install
this on the release branch ASAP.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64922; Package emacs. (Sat, 29 Jul 2023 09:14:02 GMT) Full text and rfc822 format available.

Message #11 received at 64922 <at> debbugs.gnu.org (full text, mbox):

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>, Vincenzo Pupillo <v.pupillo <at> gmail.com>,
 Yuan Fu <casouri <at> gmail.com>
Cc: 64922 <at> debbugs.gnu.org
Subject: Re: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition
Date: Sat, 29 Jul 2023 11:13:10 +0200

On 29 July 2023 09:51:19 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
>> Date: Fri, 28 Jul 2023 22:59:27 +0200
>> 
>> Hi, a recent commit (commit fe9b5e022950d53cb23959b76c240e1da27ff0a5) changed 
>> the definition of the cmake grammar, now there is a new node argument_list used 
>> to wrap nodes of type argument. 
>> This causes the following error:
>> Error during redisplay: (jit-lock-function 1) signaled (treesit-query-error 
>> "Structure error at" 19 "((foreach_command ((argument) @font-lock-constant-
>> face (#match \"\\\\(?:^\\\\(?:I\\\\(?:N\\\\|TEMS\\\\)\\\\|LISTS\\\\|RANGE\\\\|
>> ZIP_LISTS\\\\)$\\\\)\" @font-lock-constant-face)))) ((if_command ((argument) 
>> @font-lock-constant-face (#match \"\\\\(?:^\\\\(?:AND\\\\|COMMAND\\\\|DEFINED\
>> \\\|E\\\\(?:QUAL\\\\|XISTS\\\\)\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\
>> (?:_EQUAL\\\\)?\\\\|MATCHES\\\\|NOT\\\\|OR\\\\|PATH_EQUAL\\\\|STR\\\\(?:EQUAL\
>> \\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\\|VERSION_\\
>> \\(?:EQUAL\\\\|GREATER\\\\(?:_EQUAL\\\\)?\\\\|LESS\\\\(?:_EQUAL\\\\)?\\\\)\\\
>> \)$\\\\)\" @font-lock-constant-face))))" "Debug the query with `treesit-query-
>> validate'")
>> 
>> The attached patch supports both the old and the new grammar.
>
>Thanks.
>
>Theo, yuan: any comments to the patch?  If okay, I'd like to install
>this on the release branch ASAP.

I'm not able to look at it until tonight, which is in 8-9 hours. If that's not asap enough, I trust your judgement more than mine anyways ;-)

If that's not too late I'll take a look then and install if ok.

Theo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64922; Package emacs. (Sat, 29 Jul 2023 10:43:01 GMT) Full text and rfc822 format available.

Message #14 received at 64922 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: casouri <at> gmail.com, v.pupillo <at> gmail.com, 64922 <at> debbugs.gnu.org
Subject: Re: bug#64922: treesit-query-error due to a recent change to
 tree-sitter-cmake grammar definition
Date: Sat, 29 Jul 2023 13:42:31 +0300
> Date: Sat, 29 Jul 2023 11:13:10 +0200
> From: Theodor Thornhill <theo <at> thornhill.no>
> CC: 64922 <at> debbugs.gnu.org
> 
> On 29 July 2023 09:51:19 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> >Theo, yuan: any comments to the patch?  If okay, I'd like to install
> >this on the release branch ASAP.
> 
> I'm not able to look at it until tonight, which is in 8-9 hours.

I guess it's okay, as I'll need to postpone the decision about
releasing Emacs 29.1 till tomorrow anyway.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64922; Package emacs. (Sat, 29 Jul 2023 12:23:01 GMT) Full text and rfc822 format available.

Message #17 received at 64922 <at> debbugs.gnu.org (full text, mbox):

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: casouri <at> gmail.com, v.pupillo <at> gmail.com, 64922 <at> debbugs.gnu.org
Subject: Re: bug#64922: treesit-query-error due to a recent change to tree-sitter-cmake grammar definition
Date: Sat, 29 Jul 2023 14:22:02 +0200

On 29 July 2023 12:42:31 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> Date: Sat, 29 Jul 2023 11:13:10 +0200
>> From: Theodor Thornhill <theo <at> thornhill.no>
>> CC: 64922 <at> debbugs.gnu.org
>> 
>> On 29 July 2023 09:51:19 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> >
>> >Theo, yuan: any comments to the patch?  If okay, I'd like to install
>> >this on the release branch ASAP.
>> 
>> I'm not able to look at it until tonight, which is in 8-9 hours.
>
>I guess it's okay, as I'll need to postpone the decision about
>releasing Emacs 29.1 till tomorrow anyway.
>
>Thanks.

Ok thanks, I'll be swift

Theo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64922; Package emacs. (Sat, 29 Jul 2023 19:20:01 GMT) Full text and rfc822 format available.

Message #20 received at 64922 <at> debbugs.gnu.org (full text, mbox):

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: casouri <at> gmail.com, v.pupillo <at> gmail.com, 64922 <at> debbugs.gnu.org
Subject: Re: bug#64922: treesit-query-error due to a recent change to
 tree-sitter-cmake grammar definition
Date: Sat, 29 Jul 2023 21:19:38 +0200
Theodor Thornhill <theo <at> thornhill.no> writes:

> On 29 July 2023 12:42:31 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>> Date: Sat, 29 Jul 2023 11:13:10 +0200
>>> From: Theodor Thornhill <theo <at> thornhill.no>
>>> CC: 64922 <at> debbugs.gnu.org
>>> 
>>> On 29 July 2023 09:51:19 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>> >
>>> >Theo, yuan: any comments to the patch?  If okay, I'd like to install
>>> >this on the release branch ASAP.
>>> 
>>> I'm not able to look at it until tonight, which is in 8-9 hours.
>>
>>I guess it's okay, as I'll need to postpone the decision about
>>releasing Emacs 29.1 till tomorrow anyway.
>>
>>Thanks.
>
> Ok thanks, I'll be swift
>
> Theo

Installed.

@Vincenzo - thanks for the patch! For the next one, please make sure the
commit message conforms with the directions in CONTRIBUTE, in particular
line length :)

Theo




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 29 Jul 2023 19:26:02 GMT) Full text and rfc822 format available.

Notification sent to Vincenzo Pupillo <v.pupillo <at> gmail.com>:
bug acknowledged by developer. (Sat, 29 Jul 2023 19:26:02 GMT) Full text and rfc822 format available.

Message #25 received at 64922-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: casouri <at> gmail.com, v.pupillo <at> gmail.com, 64922-done <at> debbugs.gnu.org
Subject: Re: bug#64922: treesit-query-error due to a recent change to
 tree-sitter-cmake grammar definition
Date: Sat, 29 Jul 2023 22:24:59 +0300
> From: Theodor Thornhill <theo <at> thornhill.no>
> Cc: v.pupillo <at> gmail.com, casouri <at> gmail.com, 64922 <at> debbugs.gnu.org
> Date: Sat, 29 Jul 2023 21:19:38 +0200
> 
> Installed.

Thanks!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 27 Aug 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.