GNU bug report logs - #65113
Emacs-29 and master csharp-mode with broken treesit

Previous Next

Package: emacs;

Reported by: J M <jean <at> tbm.email>

Date: Sun, 6 Aug 2023 15:05: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 65113 in the body.
You can then email your comments to 65113 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#65113; Package emacs. (Sun, 06 Aug 2023 15:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to J M <jean <at> tbm.email>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 06 Aug 2023 15:05:02 GMT) Full text and rfc822 format available.

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

From: J M <jean <at> tbm.email>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs-29 and master csharp-mode with broken treesit
Date: Sun, 6 Aug 2023 16:03:45 +0100
[Message part 1 (text/plain, inline)]
Hi all

Treesit is broken for csharp-mode in the latest version in master and emacs-29 and therefore does not provide syntax highlighting. 

The latest grammar repository (https://github.com/tree-sitter/tree-sitter-c-sharp) has removed the keyword void_keyword.

Please see attached the patch to resolve the issue.

Thanks
Jean M
[Message part 2 (text/html, inline)]
[treesit_void_keyword_removed_from_grammar.patch (application/octet-stream, attachment)]
[Message part 4 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65113; Package emacs. (Sun, 06 Aug 2023 15:37:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: J M <jean <at> tbm.email>, Theodor Thornhill <theo <at> thornhill.no>,
 Yuan Fu <casouri <at> gmail.com>
Cc: 65113 <at> debbugs.gnu.org
Subject: Re: bug#65113: Emacs-29 and master csharp-mode with broken treesit
Date: Sun, 06 Aug 2023 18:36:47 +0300
> From: J M <jean <at> tbm.email>
> Date: Sun, 6 Aug 2023 16:03:45 +0100
> 
> Treesit is broken for csharp-mode in the latest version in master and emacs-29 and therefore does not provide syntax highlighting. 
> 
> The latest grammar repository (https://github.com/tree-sitter/tree-sitter-c-sharp) has removed the keyword void_keyword.
> 
> Please see attached the patch to resolve the issue.

Thanks, but your patch will not work with the older version of the
grammar library, right?  Is it possible to make a patch that will work
with both?  Wed cannot rely on users having the latest grammar
versions, so a backward-compatible change is much more preferable.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65113; Package emacs. (Mon, 07 Aug 2023 05:47:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>, J M <jean <at> tbm.email>,
 Yuan Fu <casouri <at> gmail.com>
Cc: 65113 <at> debbugs.gnu.org
Subject: Re: bug#65113: Emacs-29 and master csharp-mode with broken treesit
Date: Mon, 07 Aug 2023 07:46:05 +0200

On 6 August 2023 17:36:47 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: J M <jean <at> tbm.email>
>> Date: Sun, 6 Aug 2023 16:03:45 +0100
>> 
>> Treesit is broken for csharp-mode in the latest version in master and emacs-29 and therefore does not provide syntax highlighting. 
>> 
>> The latest grammar repository (https://github.com/tree-sitter/tree-sitter-c-sharp) has removed the keyword void_keyword.
>> 
>> Please see attached the patch to resolve the issue.
>
>Thanks, but your patch will not work with the older version of the
>grammar library, right?  Is it possible to make a patch that will work
>with both?  Wed cannot rely on users having the latest grammar
>versions, so a backward-compatible change is much more preferable.

We've had some similar patches lately that you can use for inspiration.

Thanks,
Theo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65113; Package emacs. (Thu, 10 Aug 2023 09:06:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: jean <at> tbm.email, Theodor Thornhill <theo <at> thornhill.no>
Cc: casouri <at> gmail.com, 65113 <at> debbugs.gnu.org
Subject: Re: bug#65113: Emacs-29 and master csharp-mode with broken treesit
Date: Thu, 10 Aug 2023 12:05:51 +0300
> Date: Mon, 07 Aug 2023 07:46:05 +0200
> From: Theodor Thornhill <theo <at> thornhill.no>
> CC: 65113 <at> debbugs.gnu.org

Ping!  Can we please have a patch that is backward-compatible?

> On 6 August 2023 17:36:47 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >> From: J M <jean <at> tbm.email>
> >> Date: Sun, 6 Aug 2023 16:03:45 +0100
> >> 
> >> Treesit is broken for csharp-mode in the latest version in master and emacs-29 and therefore does not provide syntax highlighting. 
> >> 
> >> The latest grammar repository (https://github.com/tree-sitter/tree-sitter-c-sharp) has removed the keyword void_keyword.
> >> 
> >> Please see attached the patch to resolve the issue.
> >
> >Thanks, but your patch will not work with the older version of the
> >grammar library, right?  Is it possible to make a patch that will work
> >with both?  Wed cannot rely on users having the latest grammar
> >versions, so a backward-compatible change is much more preferable.
> 
> We've had some similar patches lately that you can use for inspiration.
> 
> Thanks,
> Theo
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65113; Package emacs. (Thu, 10 Aug 2023 22:43:01 GMT) Full text and rfc822 format available.

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

From: J M <jean <at> tbm.email>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: casouri <at> gmail.com, 65113 <at> debbugs.gnu.org,
 Theodor Thornhill <theo <at> thornhill.no>
Subject: Re: bug#65113: Emacs-29 and master csharp-mode with broken treesit
Date: Thu, 10 Aug 2023 23:42:22 +0100
[Message part 1 (text/plain, inline)]
Hi Eli

See attached the requested backward-compatible change.

[0001-Update-csharp-treesit-support-due-to-upstream-change.patch (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]


> On 10 Aug 2023, at 10:05, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> Date: Mon, 07 Aug 2023 07:46:05 +0200
>> From: Theodor Thornhill <theo <at> thornhill.no>
>> CC: 65113 <at> debbugs.gnu.org
> 
> Ping!  Can we please have a patch that is backward-compatible?
> 
>> On 6 August 2023 17:36:47 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>>> From: J M <jean <at> tbm.email>
>>>> Date: Sun, 6 Aug 2023 16:03:45 +0100
>>>> 
>>>> Treesit is broken for csharp-mode in the latest version in master and emacs-29 and therefore does not provide syntax highlighting. 
>>>> 
>>>> The latest grammar repository (https://github.com/tree-sitter/tree-sitter-c-sharp) has removed the keyword void_keyword.
>>>> 
>>>> Please see attached the patch to resolve the issue.
>>> 
>>> Thanks, but your patch will not work with the older version of the
>>> grammar library, right?  Is it possible to make a patch that will work
>>> with both?  Wed cannot rely on users having the latest grammar
>>> versions, so a backward-compatible change is much more preferable.
>> 
>> We've had some similar patches lately that you can use for inspiration.
>> 
>> Thanks,
>> Theo
>> 


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65113; Package emacs. (Fri, 11 Aug 2023 05:58:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: J M <jean <at> tbm.email>
Cc: casouri <at> gmail.com, 65113 <at> debbugs.gnu.org, theo <at> thornhill.no
Subject: Re: bug#65113: Emacs-29 and master csharp-mode with broken treesit
Date: Fri, 11 Aug 2023 08:57:50 +0300
> From: J M <jean <at> tbm.email>
> Date: Thu, 10 Aug 2023 23:42:22 +0100
> Cc: Theodor Thornhill <theo <at> thornhill.no>,
>  casouri <at> gmail.com,
>  65113 <at> debbugs.gnu.org
> 
> See attached the requested backward-compatible change.

Thank you!  Should we perhaps swap the order, and query first about
the newer type, so as to make the code a bit faster when used with the
latest grammar?




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 12 Aug 2023 07:27:01 GMT) Full text and rfc822 format available.

Notification sent to J M <jean <at> tbm.email>:
bug acknowledged by developer. (Sat, 12 Aug 2023 07:27:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: J M <jean <at> tbm.email>
Cc: casouri <at> gmail.com, theo <at> thornhill.no, 65113-done <at> debbugs.gnu.org
Subject: Re: bug#65113: Emacs-29 and master csharp-mode with broken treesit
Date: Sat, 12 Aug 2023 10:27:14 +0300
> From: J M <jean <at> tbm.email>
> Date: Thu, 10 Aug 2023 23:42:22 +0100
> Cc: Theodor Thornhill <theo <at> thornhill.no>,
>  casouri <at> gmail.com,
>  65113 <at> debbugs.gnu.org
> 
> See attached the requested backward-compatible change.

Thanks, installed on the emacs-29 branch, and closing the bug.

Please in the future accompany your changes with a ChangeLog-style
description of files and functions where you make changes (I did it
this time for you).




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

This bug report was last modified 1 year and 287 days ago.

Previous Next


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