GNU bug report logs - #71998
31.0.50; Typescript grammar v0.21.2 causes test failure

Previous Next

Package: emacs;

Reported by: john muhl <jm <at> pub.pink>

Date: Mon, 8 Jul 2024 15:14:01 UTC

Severity: normal

Found in version 31.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

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 71998 in the body.
You can then email your comments to 71998 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#71998; Package emacs. (Mon, 08 Jul 2024 15:14:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to john muhl <jm <at> pub.pink>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 08 Jul 2024 15:14:02 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Mon, 08 Jul 2024 10:11:04 -0500
[Message part 1 (text/plain, inline)]
The newly released version 0.21.2 of the typescript grammar caused
the typescript-ts-mode tests to start failing.

[typescript-ts-mode-tests.log (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Mon, 08 Jul 2024 15:20:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: john muhl <jm <at> pub.pink>, 71998 <at> debbugs.gnu.org
Cc: Theodor Thornhill <theo <at> thornhill.no>
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Mon, 8 Jul 2024 15:18:31 +0000
john muhl <jm <at> pub.pink> writes:

> The newly released version 0.21.2 of the typescript grammar caused
> the typescript-ts-mode tests to start failing.

Theodor, could you please take a look at this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Wed, 17 Jul 2024 00:00:01 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Tue, 16 Jul 2024 18:59:01 -0500
john muhl <jm <at> pub.pink> writes:

> The newly released version 0.21.2 of the typescript grammar caused
> the typescript-ts-mode tests to start failing.

I was mistaken about the new grammar breaking the test (it just
made it visible). Replacing it with:

  =-=
  const foo = (props) => {
  return (
  <div>
  <div>
  <div>
  <div>
  {
  props.foo
  ? Hello, foo!
  : Hello, World!;
  }
  </div>
  </div>
  </div>
  </div>
  );
  }
  =-=
  const foo = (props) => {
    return (
      <div>
        <div>
          <div>
            <div>
              {
                props.foo
                  ? Hello, foo!
                  : Hello, World!;
              }
            </div>
          </div>
        </div>
      </div>
    );
  }
  =-=-=

and running with older grammars (0.19,20,21) also fails.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Sat, 20 Jul 2024 08:54:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: john muhl <jm <at> pub.pink>, Theodor Thornhill <theo <at> thornhill.no>
Cc: 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sat, 20 Jul 2024 11:52:55 +0300
> From: john muhl <jm <at> pub.pink>
> Date: Tue, 16 Jul 2024 18:59:01 -0500
> 
> john muhl <jm <at> pub.pink> writes:
> 
> > The newly released version 0.21.2 of the typescript grammar caused
> > the typescript-ts-mode tests to start failing.
> 
> I was mistaken about the new grammar breaking the test (it just
> made it visible). Replacing it with:
> 
>   =-=
>   const foo = (props) => {
>   return (
>   <div>
>   <div>
>   <div>
>   <div>
>   {
>   props.foo
>   ? Hello, foo!
>   : Hello, World!;
>   }
>   </div>
>   </div>
>   </div>
>   </div>
>   );
>   }
>   =-=
>   const foo = (props) => {
>     return (
>       <div>
>         <div>
>           <div>
>             <div>
>               {
>                 props.foo
>                   ? Hello, foo!
>                   : Hello, World!;
>               }
>             </div>
>           </div>
>         </div>
>       </div>
>     );
>   }
>   =-=-=
> 
> and running with older grammars (0.19,20,21) also fails.

Theo, any ideas, comments or suggestions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Sat, 20 Jul 2024 10:02:01 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>, john muhl <jm <at> pub.pink>
Cc: 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sat, 20 Jul 2024 12:01:22 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: john muhl <jm <at> pub.pink>
>> Date: Tue, 16 Jul 2024 18:59:01 -0500
>> 
>> john muhl <jm <at> pub.pink> writes:
>> 
>> > The newly released version 0.21.2 of the typescript grammar caused
>> > the typescript-ts-mode tests to start failing.
>> 
>> I was mistaken about the new grammar breaking the test (it just
>> made it visible). Replacing it with:
>> 
>>   =-=
>>   const foo = (props) => {
>>   return (
>>   <div>
>>   <div>
>>   <div>
>>   <div>
>>   {
>>   props.foo
>>   ? Hello, foo!
>>   : Hello, World!;
>>   }
>>   </div>
>>   </div>
>>   </div>
>>   </div>
>>   );
>>   }
>>   =-=
>>   const foo = (props) => {
>>     return (
>>       <div>
>>         <div>
>>           <div>
>>             <div>
>>               {
>>                 props.foo
>>                   ? Hello, foo!
>>                   : Hello, World!;
>>               }
>>             </div>
>>           </div>
>>         </div>
>>       </div>
>>     );
>>   }
>>   =-=-=
>> 
>> and running with older grammars (0.19,20,21) also fails.
>
> Theo, any ideas, comments or suggestions?

Yeah, it seems it is one of the compat-functions that causes this,
afaict. Taking a look right now. Probably should be possible to catch
some errors here.

Theo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Sat, 20 Jul 2024 10:26:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>, john muhl <jm <at> pub.pink>
Cc: 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sat, 20 Jul 2024 12:25:16 +0200
Theodor Thornhill <theo <at> thornhill.no> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: john muhl <jm <at> pub.pink>
>>> Date: Tue, 16 Jul 2024 18:59:01 -0500
>>> 
>>> john muhl <jm <at> pub.pink> writes:
>>> 
>>> > The newly released version 0.21.2 of the typescript grammar caused
>>> > the typescript-ts-mode tests to start failing.
>>> 
>>> I was mistaken about the new grammar breaking the test (it just
>>> made it visible). Replacing it with:
>>> 
>>>   =-=
>>>   const foo = (props) => {
>>>   return (
>>>   <div>
>>>   <div>
>>>   <div>
>>>   <div>
>>>   {
>>>   props.foo
>>>   ? Hello, foo!
>>>   : Hello, World!;
>>>   }
>>>   </div>
>>>   </div>
>>>   </div>
>>>   </div>
>>>   );
>>>   }
>>>   =-=
>>>   const foo = (props) => {
>>>     return (
>>>       <div>
>>>         <div>
>>>           <div>
>>>             <div>
>>>               {
>>>                 props.foo
>>>                   ? Hello, foo!
>>>                   : Hello, World!;
>>>               }
>>>             </div>
>>>           </div>
>>>         </div>
>>>       </div>
>>>     );
>>>   }
>>>   =-=-=
>>> 
>>> and running with older grammars (0.19,20,21) also fails.
>>
>> Theo, any ideas, comments or suggestions?
>
> Yeah, it seems it is one of the compat-functions that causes this,
> afaict. Taking a look right now. Probably should be possible to catch
> some errors here.
>
> Theo


It seems this fixes the problems, but I'll try to fix the underlying
issue as well. This change was introduced in
bcf287bd11405b21033466cf0284653e45b54be7, and it looks like this caused
the regression.

Theo

```
diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el
index 3606a139d50..029705b4137 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -88,7 +88,7 @@ tsx-ts-mode--indent-compatibility-b893426
       (progn (treesit-query-capture 'tsx '((jsx_fragment) @capture))
              `(((match "<" "jsx_fragment") parent 0)
                ((parent-is "jsx_fragment") parent typescript-ts-mode-indent-offset)))
-    (treesit-query-error
+    (error
      `(((match "<" "jsx_text") parent 0)
        ((parent-is "jsx_text") parent typescript-ts-mode-indent-offset)))))
 
@@ -201,7 +201,7 @@ tsx-ts-mode--font-lock-compatibility-bb1f97b
 	       (jsx_self_closing_element
 		[(member_expression (identifier)) (identifier)]
 		@typescript-ts-jsx-tag-face)))
-    (treesit-query-error
+    (error
            '((jsx_opening_element
 	      [(nested_identifier (identifier)) (identifier)]
 	      @typescript-ts-jsx-tag-face)
@@ -223,7 +223,7 @@ tsx-ts-mode--font-lock-compatibility-function-expression
       (progn (treesit-query-capture language '((function_expression) @cap))
              ;; New version of the grammar
              'function_expression)
-    (treesit-query-error
+    (error
     ;; Old version of the grammar
     'function)))
 
```




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Sun, 21 Jul 2024 12:59:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Eli Zaretskii <eliz <at> gnu.org>, john muhl <jm <at> pub.pink>
Cc: 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sun, 21 Jul 2024 14:58:31 +0200
Theodor Thornhill <theo <at> thornhill.no> writes:

> Theodor Thornhill <theo <at> thornhill.no> writes:
>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>>>> From: john muhl <jm <at> pub.pink>


I now synced to latest master, and I can no longer reproduce this. John,
do you still see an issue after syncing with master?

I'll push some small improvements for error handling and tests for
typescript-ts-mode anyways.

Thanks,
Theo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Sun, 21 Jul 2024 18:21:02 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sun, 21 Jul 2024 13:20:25 -0500
[Message part 1 (text/plain, inline)]
Theodor Thornhill <theo <at> thornhill.no> writes:

> I now synced to latest master, and I can no longer reproduce this. John,
> do you still see an issue after syncing with master?

I have been testing the emacs-30 branch and still see it there as
of 68615a38669.

On master (ccb856189f4) there are segfaults running the tests for
typescript, c, java and ruby -ts-modes caused by 1abf3bdd7ed.

With that reverted I get the same test failure as on emacs-30.

[typescript-ts-mode-tests.log (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Sun, 21 Jul 2024 18:35:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: john muhl <jm <at> pub.pink>, Yuan Fu <casouri <at> gmail.com>
Cc: theo <at> thornhill.no, 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sun, 21 Jul 2024 21:34:09 +0300
> From: john muhl <jm <at> pub.pink>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  71998 <at> debbugs.gnu.org
> Date: Sun, 21 Jul 2024 13:20:25 -0500
> 
> On master (ccb856189f4) there are segfaults running the tests for
> typescript, c, java and ruby -ts-modes caused by 1abf3bdd7ed.

Yuan, can you look into these segfaults?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Sun, 21 Jul 2024 22:25:01 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Yuan Fu <casouri <at> gmail.com>, theo <at> thornhill.no, 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sun, 21 Jul 2024 17:23:51 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: john muhl <jm <at> pub.pink>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  71998 <at> debbugs.gnu.org
>> Date: Sun, 21 Jul 2024 13:20:25 -0500
>> 
>> On master (ccb856189f4) there are segfaults running the tests for
>> typescript, c, java and ruby -ts-modes caused by 1abf3bdd7ed.
>
> Yuan, can you look into these segfaults?

bug#72238 may be hitting the same issue.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Mon, 22 Jul 2024 00:06:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: john muhl <jm <at> pub.pink>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Theodor Thornhill <theo <at> thornhill.no>,
 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sun, 21 Jul 2024 17:04:12 -0700

> On Jul 21, 2024, at 3:23 PM, john muhl <jm <at> pub.pink> wrote:
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
>>> From: john muhl <jm <at> pub.pink>
>>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  71998 <at> debbugs.gnu.org
>>> Date: Sun, 21 Jul 2024 13:20:25 -0500
>>> 
>>> On master (ccb856189f4) there are segfaults running the tests for
>>> typescript, c, java and ruby -ts-modes caused by 1abf3bdd7ed.
>> 
>> Yuan, can you look into these segfaults?
> 
> bug#72238 may be hitting the same issue.

Yeah 1abf3bdd7ed kind of exposed a bug, I pushed a fix on master. Sorry about that.

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Fri, 20 Sep 2024 17:06:02 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, john muhl <jm <at> pub.pink>,
 Theodor Thornhill <theo <at> thornhill.no>, 71998 <at> debbugs.gnu.org
Subject: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Fri, 20 Sep 2024 19:03:59 +0200
> The newly released version 0.21.2 of the typescript grammar caused the typescript-ts-mode tests to start failing.

I still get the exact same test error on master. Is this supposed to be fixed?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Mon, 24 Feb 2025 02:13:01 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: Yuan Fu <casouri <at> gmail.com>, Theodor Thornhill <theo <at> thornhill.no>,
 Eli Zaretskii <eliz <at> gnu.org>, 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sun, 23 Feb 2025 20:11:50 -0600
[Message part 1 (text/plain, inline)]
Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:

>> The newly released version 0.21.2 of the typescript grammar caused
> the typescript-ts-mode tests to start failing.
>
> I still get the exact same test error on master. Is this supposed to be fixed?

I’m still seeing this test failure and a after a little poking
around I found that setting indent-tabs-mode to nil after changing
the major mode in the test setup fixes it for me. I don’t
understand why that’s a problem here and not in other tests but I
tested it on two different systems and they both pass now.

p.s. While looking around I noticed that tree-sitter reports
errors in the code of the “JSX indentation” test. Looks like the
values after the ? & : should be quoted but I don’t know anything
about TS/JSX.

[0001-Fix-typescript-ts-mode-indent-test.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Mon, 24 Feb 2025 06:09:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: john muhl <jm <at> pub.pink>
Cc: Mattias Engdegård <mattias.engdegard <at> gmail.com>,
 Theodor Thornhill <theo <at> thornhill.no>, Eli Zaretskii <eliz <at> gnu.org>,
 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Sun, 23 Feb 2025 22:08:21 -0800

> On Feb 23, 2025, at 6:11 PM, john muhl <jm <at> pub.pink> wrote:
> 
> Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:
> 
>>> The newly released version 0.21.2 of the typescript grammar caused
>> the typescript-ts-mode tests to start failing.
>> 
>> I still get the exact same test error on master. Is this supposed to be fixed?
> 
> I’m still seeing this test failure and a after a little poking
> around I found that setting indent-tabs-mode to nil after changing
> the major mode in the test setup fixes it for me. I don’t
> understand why that’s a problem here and not in other tests but I
> tested it on two different systems and they both pass now.

Thanks Mattias, I applied you patch.

> p.s. While looking around I noticed that tree-sitter reports
> errors in the code of the “JSX indentation” test. Looks like the
> values after the ? & : should be quoted but I don’t know anything
> about TS/JSX.

You’re right, they should be quoted. And there shouldn’t be a semi-colon at the end either, since the whole things is supposed to be an expression rather than a statement.

I applied another patch that fixed it.

Yuan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Mon, 24 Feb 2025 10:13:01 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, john muhl <jm <at> pub.pink>,
 Theodor Thornhill <theo <at> thornhill.no>, 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Mon, 24 Feb 2025 11:12:23 +0100
24 feb. 2025 kl. 07.08 skrev Yuan Fu <casouri <at> gmail.com>:

> Thanks Mattias, I applied you patch.

To be clear, that's John's patch (which seems to work well, thank you both).





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71998; Package emacs. (Tue, 25 Feb 2025 07:23:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, john muhl <jm <at> pub.pink>,
 Theodor Thornhill <theo <at> thornhill.no>, 71998 <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Mon, 24 Feb 2025 23:22:00 -0800

> On Feb 24, 2025, at 2:12 AM, Mattias Engdegård <mattias.engdegard <at> gmail.com> wrote:
> 
> 24 feb. 2025 kl. 07.08 skrev Yuan Fu <casouri <at> gmail.com>:
> 
>> Thanks Mattias, I applied you patch.
> 
> To be clear, that's John's patch (which seems to work well, thank you both).
> 

Ah you’re right, sorry John!

Yuan



Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Sat, 01 Mar 2025 01:43:02 GMT) Full text and rfc822 format available.

Notification sent to john muhl <jm <at> pub.pink>:
bug acknowledged by developer. (Sat, 01 Mar 2025 01:43:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Mattias Engdegård <mattias.engdegard <at> gmail.com>,
 john muhl <jm <at> pub.pink>, Theodor Thornhill <theo <at> thornhill.no>,
 Eli Zaretskii <eliz <at> gnu.org>, 71998-done <at> debbugs.gnu.org
Subject: Re: bug#71998: 31.0.50; Typescript grammar v0.21.2 causes test failure
Date: Fri, 28 Feb 2025 17:42:30 -0800
Yuan Fu <casouri <at> gmail.com> writes:

>> On Feb 23, 2025, at 6:11 PM, john muhl <jm <at> pub.pink> wrote:
>>
>> Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:
>>
>>>> The newly released version 0.21.2 of the typescript grammar caused
>>> the typescript-ts-mode tests to start failing.
>>>
>>> I still get the exact same test error on master. Is this supposed to be fixed?
>>
>> I’m still seeing this test failure and a after a little poking
>> around I found that setting indent-tabs-mode to nil after changing
>> the major mode in the test setup fixes it for me. I don’t
>> understand why that’s a problem here and not in other tests but I
>> tested it on two different systems and they both pass now.
>
> Thanks Mattias, I applied you patch.
>
>> p.s. While looking around I noticed that tree-sitter reports
>> errors in the code of the “JSX indentation” test. Looks like the
>> values after the ? & : should be quoted but I don’t know anything
>> about TS/JSX.
>
> You’re right, they should be quoted. And there shouldn’t be a semi-colon at the
> end either, since the whole things is supposed to be an expression rather than a
> statement.
>
> I applied another patch that fixed it.

It seems like the patches were applied here, so I'm closing this bug.




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

This bug report was last modified 86 days ago.

Previous Next


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