GNU bug report logs - #67976
java-ts-mode test failure

Previous Next

Package: emacs;

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

Date: Fri, 22 Dec 2023 22:08: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 67976 in the body.
You can then email your comments to 67976 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#67976; Package emacs. (Fri, 22 Dec 2023 22:08:02 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. (Fri, 22 Dec 2023 22:08: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: java-ts-mode test failure
Date: Fri, 22 Dec 2023 15:09:02 -0600
Bisect says the first bad commit is 9874561f39e

/home/build/emacs/src/emacs -batch -load .emacs -load /home/build/emacs/lisp/progmodes/java-ts-mode.el ert -load /home/build/emacs/test/lisp/progmodes/java-ts-mode-tests.el -eval '(ert-run-tests-batch-and-exit '\''(not (tag :unstable)))'
Running 2 tests (2023-12-22 19:05:47+0000, selector ‘(not (tag :unstable))’)
Test java-ts-mode-test-indentation backtrace:
  signal(ert-test-failed (("Mismatch in test \"Statements\", file /hom
  ert-fail(("Mismatch in test \"Statements\", file /home/build/emacs/t
  ert-test--erts-test(((code lambda nil (setq indent-tabs-mode nil) (s
  ert-test-erts-file("/home/build/emacs/test/lisp/progmodes/java-ts-mo
  (closure (t) nil (let* ((fn-0 #'treesit-ready-p) (args-1 (condition-
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name java-ts-mode-test-indentation :docume
  ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable)) 
  ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
  ert-run-tests-batch((not (tag :unstable)))
  ert-run-tests-batch-and-exit((not (tag :unstable)))
  eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
  command-line-1(("-load" ".emacs" "-load" "/home/build/emacs/lisp/pro
  command-line()
  normal-top-level()
Test java-ts-mode-test-indentation condition:
    (ert-test-failed
     ("Mismatch in test \"Statements\", file /home/build/emacs/test/lisp/progmodes/java-ts-mode-resources/indent.erts"
      #(
	"if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n\11for (int i = 0; x < foos.size(); i++) {\n            return;\n\11}\n    } else {\n\11return;\n    }\n"
	0 159 (fontified nil))
    "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n    for (int i = 0; x < foos.size(); i++) {\n        return;\n    }\n} else {\n    return;\n}\n"))
   FAILED  1/2  java-ts-mode-test-indentation (0.010839 sec) at emacs/test/lisp/progmodes/java-ts-mode-tests.el:26
   passed  2/2  java-ts-mode-test-movement (0.004179 sec)

Ran 2 tests, 1 results as expected, 1 unexpected (2023-12-22 19:05:47+0000, 0.134714 sec)

1 unexpected results:
   FAILED  java-ts-mode-test-indentation




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

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

From: Yuan Fu <casouri <at> gmail.com>
To: john muhl <jm <at> pub.pink>
Cc: Theodor Thornhill <theo <at> thornhill.no>, 67976 <at> debbugs.gnu.org
Subject: Re: bug#67976: java-ts-mode test failure
Date: Fri, 22 Dec 2023 21:28:25 -0800

> On Dec 22, 2023, at 1:09 PM, john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
> 
> Bisect says the first bad commit is 9874561f39e
> 
> /home/build/emacs/src/emacs -batch -load .emacs -load /home/build/emacs/lisp/progmodes/java-ts-mode.el ert -load /home/build/emacs/test/lisp/progmodes/java-ts-mode-tests.el -eval '(ert-run-tests-batch-and-exit '\''(not (tag :unstable)))'
> Running 2 tests (2023-12-22 19:05:47+0000, selector ‘(not (tag :unstable))’)
> Test java-ts-mode-test-indentation backtrace:
>  signal(ert-test-failed (("Mismatch in test \"Statements\", file /hom
>  ert-fail(("Mismatch in test \"Statements\", file /home/build/emacs/t
>  ert-test--erts-test(((code lambda nil (setq indent-tabs-mode nil) (s
>  ert-test-erts-file("/home/build/emacs/test/lisp/progmodes/java-ts-mo
>  (closure (t) nil (let* ((fn-0 #'treesit-ready-p) (args-1 (condition-
>  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>  ert-run-test(#s(ert-test :name java-ts-mode-test-indentation :docume
>  ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable)) 
>  ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
>  ert-run-tests-batch((not (tag :unstable)))
>  ert-run-tests-batch-and-exit((not (tag :unstable)))
>  eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
>  command-line-1(("-load" ".emacs" "-load" "/home/build/emacs/lisp/pro
>  command-line()
>  normal-top-level()
> Test java-ts-mode-test-indentation condition:
>    (ert-test-failed
>     ("Mismatch in test \"Statements\", file /home/build/emacs/test/lisp/progmodes/java-ts-mode-resources/indent.erts"
>      #(
> "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n\11for (int i = 0; x < foos.size(); i++) {\n            return;\n\11}\n    } else {\n\11return;\n    }\n"
> 0 159 (fontified nil))
>    "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n    for (int i = 0; x < foos.size(); i++) {\n        return;\n    }\n} else {\n    return;\n}\n"))
>   FAILED  1/2  java-ts-mode-test-indentation (0.010839 sec) at emacs/test/lisp/progmodes/java-ts-mode-tests.el:26
>   passed  2/2  java-ts-mode-test-movement (0.004179 sec)
> 
> Ran 2 tests, 1 results as expected, 1 unexpected (2023-12-22 19:05:47+0000, 0.134714 sec)
> 
> 1 unexpected results:
>   FAILED  java-ts-mode-test-indentation
> 

CC’ing Theo here, since I don’t know java-ts-mode very well.

Yuan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67976; Package emacs. (Thu, 28 Dec 2023 08:03:01 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Yuan Fu <casouri <at> gmail.com>, john muhl <jm <at> pub.pink>
Cc: 67976 <at> debbugs.gnu.org
Subject: Re: bug#67976: java-ts-mode test failure
Date: Thu, 28 Dec 2023 09:02:19 +0100
Yuan Fu <casouri <at> gmail.com> writes:

>> On Dec 22, 2023, at 1:09 PM, john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>> 
>> Bisect says the first bad commit is 9874561f39e
>> 
>> /home/build/emacs/src/emacs -batch -load .emacs -load /home/build/emacs/lisp/progmodes/java-ts-mode.el ert -load /home/build/emacs/test/lisp/progmodes/java-ts-mode-tests.el -eval '(ert-run-tests-batch-and-exit '\''(not (tag :unstable)))'
>> Running 2 tests (2023-12-22 19:05:47+0000, selector ‘(not (tag :unstable))’)
>> Test java-ts-mode-test-indentation backtrace:
>>  signal(ert-test-failed (("Mismatch in test \"Statements\", file /hom
>>  ert-fail(("Mismatch in test \"Statements\", file /home/build/emacs/t
>>  ert-test--erts-test(((code lambda nil (setq indent-tabs-mode nil) (s
>>  ert-test-erts-file("/home/build/emacs/test/lisp/progmodes/java-ts-mo
>>  (closure (t) nil (let* ((fn-0 #'treesit-ready-p) (args-1 (condition-
>>  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>>  ert-run-test(#s(ert-test :name java-ts-mode-test-indentation :docume
>>  ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable)) 
>>  ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
>>  ert-run-tests-batch((not (tag :unstable)))
>>  ert-run-tests-batch-and-exit((not (tag :unstable)))
>>  eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
>>  command-line-1(("-load" ".emacs" "-load" "/home/build/emacs/lisp/pro
>>  command-line()
>>  normal-top-level()
>> Test java-ts-mode-test-indentation condition:
>>    (ert-test-failed
>>     ("Mismatch in test \"Statements\", file /home/build/emacs/test/lisp/progmodes/java-ts-mode-resources/indent.erts"
>>      #(
>> "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n\11for (int i = 0; x < foos.size(); i++) {\n            return;\n\11}\n    } else {\n\11return;\n    }\n"
>> 0 159 (fontified nil))
>>    "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n    for (int i = 0; x < foos.size(); i++) {\n        return;\n    }\n} else {\n    return;\n}\n"))
>>   FAILED  1/2  java-ts-mode-test-indentation (0.010839 sec) at emacs/test/lisp/progmodes/java-ts-mode-tests.el:26
>>   passed  2/2  java-ts-mode-test-movement (0.004179 sec)
>> 
>> Ran 2 tests, 1 results as expected, 1 unexpected (2023-12-22 19:05:47+0000, 0.134714 sec)
>> 

Thanks, I'll look at it!

Theo

>> 1 unexpected results:
>>   FAILED  java-ts-mode-test-indentation
>> 
>
> CC’ing Theo here, since I don’t know java-ts-mode very well.
>
> Yuan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67976; Package emacs. (Thu, 28 Dec 2023 09:01:02 GMT) Full text and rfc822 format available.

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

From: Theodor Thornhill <theo <at> thornhill.no>
To: Yuan Fu <casouri <at> gmail.com>
Cc: john muhl <jm <at> pub.pink>, 67976 <at> debbugs.gnu.org
Subject: Re: bug#67976: java-ts-mode test failure
Date: Thu, 28 Dec 2023 10:00:00 +0100
Theodor Thornhill <theo <at> thornhill.no> writes:

> Yuan Fu <casouri <at> gmail.com> writes:
>
>>> On Dec 22, 2023, at 1:09 PM, john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:

[...]

>>>     ("Mismatch in test \"Statements\", file /home/build/emacs/test/lisp/progmodes/java-ts-mode-resources/indent.erts"
>>>      #(
>>> "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n\11for (int i = 0; x < foos.size(); i++) {\n            return;\n\11}\n    } else {\n\11return;\n    }\n"
>>> 0 159 (fontified nil))
>>>    "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n    for (int i = 0; x < foos.size(); i++) {\n        return;\n    }\n} else {\n    return;\n}\n"))
>>>   FAILED  1/2  java-ts-mode-test-indentation (0.010839 sec) at emacs/test/lisp/progmodes/java-ts-mode-tests.el:26
>>>   passed  2/2  java-ts-mode-test-movement (0.004179 sec)
>>> 
>>> Ran 2 tests, 1 results as expected, 1 unexpected (2023-12-22 19:05:47+0000, 0.134714 sec)
>>> 
>
> Thanks, I'll look at it!
>
> Theo
>

So I understand the bug now, and it seems you're right in that commit
being the offender. I'll see if I can rewrite the matchers to skip the
assumption that no longer works. It looks a little like a "rewrite" of
the indentation, though, so I need some time to do it correctly.

Theo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67976; Package emacs. (Sat, 30 Dec 2023 19:32:02 GMT) Full text and rfc822 format available.

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

From: john muhl <jm <at> pub.pink>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: Yuan Fu <casouri <at> gmail.com>, 67976 <at> debbugs.gnu.org
Subject: Re: bug#67976: java-ts-mode test failure
Date: Sat, 30 Dec 2023 13:18:39 -0600
Theodor Thornhill <theo <at> thornhill.no> writes:

> Theodor Thornhill <theo <at> thornhill.no> writes:
>
>> Yuan Fu <casouri <at> gmail.com> writes:
>>
>>>> On Dec 22, 2023, at 1:09 PM, john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>
> [...]
>
>>>>     ("Mismatch in test \"Statements\", file /home/build/emacs/test/lisp/progmodes/java-ts-mode-resources/indent.erts"
>>>>      #(
>>>> "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n\11for (int i = 0; x < foos.size(); i++) {\n            return;\n\11}\n    } else {\n\11return;\n    }\n"
>>>> 0 159 (fontified nil))
>>>>    "if (x) {\n    for (var foo : foos) {\n        \n    }\n} else if (y) {\n    for (int i = 0; x < foos.size(); i++) {\n        return;\n    }\n} else {\n    return;\n}\n"))
>>>>   FAILED  1/2  java-ts-mode-test-indentation (0.010839 sec) at emacs/test/lisp/progmodes/java-ts-mode-tests.el:26
>>>>   passed  2/2  java-ts-mode-test-movement (0.004179 sec)
>>>> 
>>>> Ran 2 tests, 1 results as expected, 1 unexpected (2023-12-22 19:05:47+0000, 0.134714 sec)
>>>> 
>>
>> Thanks, I'll look at it!
>>
>> Theo
>>
>
> So I understand the bug now, and it seems you're right in that commit
> being the offender. I'll see if I can rewrite the matchers to skip the
> assumption that no longer works. It looks a little like a "rewrite" of
> the indentation, though, so I need some time to do it correctly.
>
> Theo

It looks like 9874561f39e got reverted so the tests pass again.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 06 Jan 2024 09:05:01 GMT) Full text and rfc822 format available.

Notification sent to john muhl <jm <at> pub.pink>:
bug acknowledged by developer. (Sat, 06 Jan 2024 09:05:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: john muhl <jm <at> pub.pink>
Cc: casouri <at> gmail.com, theo <at> thornhill.no, 67976-done <at> debbugs.gnu.org
Subject: Re: bug#67976: java-ts-mode test failure
Date: Sat, 06 Jan 2024 11:04:13 +0200
> Cc: Yuan Fu <casouri <at> gmail.com>, 67976 <at> debbugs.gnu.org
> Date: Sat, 30 Dec 2023 13:18:39 -0600
> From:  john muhl via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> It looks like 9874561f39e got reverted so the tests pass again.

Thanks, I'm therefore closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 03 Feb 2024 12:24:12 GMT) Full text and rfc822 format available.

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

Previous Next


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