unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: emacs-30 3fcec09f754 2/4: Add debugging function for treesit.c
       [not found] ` <20240909035253.23A45C41F2E@vcs2.savannah.gnu.org>
@ 2024-09-09  3:58   ` Po Lu via Emacs development discussions.
  2024-09-09  4:13     ` Yuan Fu
  2024-09-09 11:55     ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Po Lu via Emacs development discussions. @ 2024-09-09  3:58 UTC (permalink / raw)
  To: emacs-devel; +Cc: Yuan Fu

Yuan Fu <casouri@gmail.com> writes:

> branch: emacs-30
> commit 3fcec09f754af9822339eff3ea15d43eb7d19014
> Author: Yuan Fu <casouri@gmail.com>
> Commit: Yuan Fu <casouri@gmail.com>
>
>     Add debugging function for treesit.c
>     
>     * src/treesit.c (treesit_debug_print_parser_list): New function.
> ---
>  src/treesit.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
>
> diff --git a/src/treesit.c b/src/treesit.c
> index 6e806039df0..351bd65819a 100644
> --- a/src/treesit.c
> +++ b/src/treesit.c
> @@ -485,6 +485,53 @@ treesit_initialize (void)
>  }
>  
>  \f
> +/*** Debugging */
> +
> +void treesit_debug_print_parser_list (char *msg, Lisp_Object parser)

Please insert a newline between the return type and identifier name.
Is this appropriate for Emacs 30?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs-30 3fcec09f754 2/4: Add debugging function for treesit.c
  2024-09-09  3:58   ` emacs-30 3fcec09f754 2/4: Add debugging function for treesit.c Po Lu via Emacs development discussions.
@ 2024-09-09  4:13     ` Yuan Fu
  2024-09-09 11:55     ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Yuan Fu @ 2024-09-09  4:13 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel



> On Sep 8, 2024, at 8:58 PM, Po Lu <luangruo@yahoo.com> wrote:
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> branch: emacs-30
>> commit 3fcec09f754af9822339eff3ea15d43eb7d19014
>> Author: Yuan Fu <casouri@gmail.com>
>> Commit: Yuan Fu <casouri@gmail.com>
>> 
>>    Add debugging function for treesit.c
>> 
>>    * src/treesit.c (treesit_debug_print_parser_list): New function.
>> ---
>> src/treesit.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 47 insertions(+)
>> 
>> diff --git a/src/treesit.c b/src/treesit.c
>> index 6e806039df0..351bd65819a 100644
>> --- a/src/treesit.c
>> +++ b/src/treesit.c
>> @@ -485,6 +485,53 @@ treesit_initialize (void)
>> }
>> 
>> 
>> +/*** Debugging */
>> +
>> +void treesit_debug_print_parser_list (char *msg, Lisp_Object parser)
> 
> Please insert a newline between the return type and identifier name.
> Is this appropriate for Emacs 30?

Will do. This is for debugging a hang on emacs 30 (which I still haven’t figure out yet) (bug#72863). If it’s not appropriate for emacs-30, I can revert it and later put it on master. A debugging function won’t be called by any function so it shouldn’t disrupt anything. I’m only locally inserting calls to this function in various places for debugging.

Yuan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs-30 3fcec09f754 2/4: Add debugging function for treesit.c
  2024-09-09  3:58   ` emacs-30 3fcec09f754 2/4: Add debugging function for treesit.c Po Lu via Emacs development discussions.
  2024-09-09  4:13     ` Yuan Fu
@ 2024-09-09 11:55     ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2024-09-09 11:55 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel, casouri

> Cc: Yuan Fu <casouri@gmail.com>
> Date: Mon, 09 Sep 2024 11:58:55 +0800
> From:  Po Lu via "Emacs development discussions." <emacs-devel@gnu.org>
> 
> Is this appropriate for Emacs 30?

This function will not be called by any code, only from the debugger,
so I think we can allow it.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs-30 0fd259d166c 1/4: Fix elixir-ts-mode's range query
       [not found] ` <20240909035253.077E8C41F21@vcs2.savannah.gnu.org>
@ 2024-09-09 23:00   ` john muhl
  2024-09-11  3:08     ` Yuan Fu
  0 siblings, 1 reply; 5+ messages in thread
From: john muhl @ 2024-09-09 23:00 UTC (permalink / raw)
  To: emacs-devel; +Cc: Yuan Fu

[-- Attachment #1: Type: text/plain, Size: 58 bytes --]

The elixir mode tests started failing after this commit.


[-- Attachment #2: elixir-ts-mode-tests.log --]
[-- Type: text/plain, Size: 2114 bytes --]

Running 1 tests (2024-09-09 05:57:39+0200, selector `(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))')
Test elixir-ts-mode-test-indentation backtrace:
  signal(ert-test-failed (("Mismatch in test \"Embedded HEEx\", file /
  ert-fail(("Mismatch in test \"Embedded HEEx\", file /home/build/emac
  ert-test--erts-test(((code lambda nil (elixir-ts-mode) (indent-regio
  ert-test-erts-file("/home/build/emacs-build/src-minimal/test/lisp/pr
  #f(compiled-function () #<bytecode 0x4b9a44325c9832>)()
  #f(compiled-function () #<bytecode -0xfc329de6ddc2e9>)()
  handler-bind-1(#f(compiled-function () #<bytecode -0xfc329de6ddc2e9>
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name elixir-ts-mode-test-indentation :docu
  ert-run-or-rerun-test(#s(ert--stats :selector (not (or (tag :expensi
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
  command-line()
  normal-top-level()
Test elixir-ts-mode-test-indentation condition:
    (ert-test-failed
     ("Mismatch in test \"Embedded HEEx\", file /home/build/emacs-build/src-minimal/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts"
      #("defmodule Foo do\n  def foo(assigns) do\n    ~H\"\"\"\n<span>\n  text\n</span>\n    \"\"\"\n  end\nend\n"
	0 47 (fontified nil) 47 48 (syntax-table (8) fontified nil) 48 77
	(fontified nil) 77 78 (syntax-table (8) fontified nil) 78 89
	(fontified nil))
      "defmodule Foo do\n  def foo(assigns) do\n    ~H\"\"\"\n    <span>\n      text\n    </span>\n    \"\"\"\n  end\nend\n"))
   FAILED  1/1  elixir-ts-mode-test-indentation (0.066101 sec) at lisp/progmodes/elixir-ts-mode-tests.el:26

Ran 1 tests, 0 results as expected, 1 unexpected (2024-09-09 05:57:39+0200, 0.130395 sec)

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


[-- Attachment #3: Type: text/plain, Size: 1087 bytes --]



Yuan Fu <casouri@gmail.com> writes:

> branch: emacs-30
> commit 0fd259d166c0dca4d097ad026ac748748ba88497
> Author: Yuan Fu <casouri@gmail.com>
> Commit: Yuan Fu <casouri@gmail.com>
>
>     Fix elixir-ts-mode's range query
>     
>     * lisp/progmodes/elixir-ts-mode.el:
>     (elixir-ts--treesit-range-rules): Add underscore in front of the name
>     capture, so Emacs won't put heex parser on it.
> ---
>  lisp/progmodes/elixir-ts-mode.el | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el
> index 9804152d9ab..815827ed13c 100644
> --- a/lisp/progmodes/elixir-ts-mode.el
> +++ b/lisp/progmodes/elixir-ts-mode.el
> @@ -572,7 +572,9 @@
>      (treesit-range-rules
>       :embed 'heex
>       :host 'elixir
> -     '((sigil (sigil_name) @name (:match "^[HF]$" @name) (quoted_content) @heex)))))
> +     '((sigil (sigil_name) @_name
> +              (:match "^[HF]$" @_name)
> +              (quoted_content) @heex)))))
>  
>  (defvar heex-ts--sexp-regexp)
>  (defvar heex-ts--indent-rules)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: emacs-30 0fd259d166c 1/4: Fix elixir-ts-mode's range query
  2024-09-09 23:00   ` emacs-30 0fd259d166c 1/4: Fix elixir-ts-mode's range query john muhl
@ 2024-09-11  3:08     ` Yuan Fu
  0 siblings, 0 replies; 5+ messages in thread
From: Yuan Fu @ 2024-09-11  3:08 UTC (permalink / raw)
  To: john muhl; +Cc: Emacs Devel, Wilhelm Kirschbaum

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]


> The elixir mode tests started failing after this commit.

Thanks for reporting this! Good thing we have the test :-) I’ve fixed it on emacs-30.


[-- Attachment #2: elixir-ts-mode-tests.log --]
[-- Type: text/plain, Size: 2148 bytes --]

Running 1 tests (2024-09-09 05:57:39+0200, selector `(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))')
Test elixir-ts-mode-test-indentation backtrace:
  signal(ert-test-failed (("Mismatch in test \"Embedded HEEx\", file /
  ert-fail(("Mismatch in test \"Embedded HEEx\", file /home/build/emac
  ert-test--erts-test(((code lambda nil (elixir-ts-mode) (indent-regio
  ert-test-erts-file("/home/build/emacs-build/src-minimal/test/lisp/pr
  #f(compiled-function () #<bytecode 0x4b9a44325c9832>)()
  #f(compiled-function () #<bytecode -0xfc329de6ddc2e9>)()
  handler-bind-1(#f(compiled-function () #<bytecode -0xfc329de6ddc2e9>
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name elixir-ts-mode-test-indentation :docu
  ert-run-or-rerun-test(#s(ert--stats :selector (not (or (tag :expensi
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
  command-line()
  normal-top-level()
Test elixir-ts-mode-test-indentation condition:
    (ert-test-failed
     ("Mismatch in test \"Embedded HEEx\", file /home/build/emacs-build/src-minimal/test/lisp/progmodes/elixir-ts-mode-resources/indent.erts"
      #("defmodule Foo do\n  def foo(assigns) do\n    ~H\"\"\"\n<span>\n  text\n</span>\n    \"\"\"\n  end\nend\n"
	0 47 (fontified nil) 47 48 (syntax-table (8) fontified nil) 48 77
	(fontified nil) 77 78 (syntax-table (8) fontified nil) 78 89
	(fontified nil))
      "defmodule Foo do\n  def foo(assigns) do\n    ~H\"\"\"\n    <span>\n      text\n    </span>\n    \"\"\"\n  end\nend\n"))
   FAILED  1/1  elixir-ts-mode-test-indentation (0.066101 sec) at lisp/progmodes/elixir-ts-mode-tests.el:26

Ran 1 tests, 0 results as expected, 1 unexpected (2024-09-09 05:57:39+0200, 0.130395 sec)

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


[-- Attachment #3: Type: text/plain, Size: 1147 bytes --]

> 
> 
> Yuan Fu <casouri@gmail.com> writes:
> 
>> branch: emacs-30
>> commit 0fd259d166c0dca4d097ad026ac748748ba88497
>> Author: Yuan Fu <casouri@gmail.com>
>> Commit: Yuan Fu <casouri@gmail.com>
>> 
>>    Fix elixir-ts-mode's range query
>> 
>>    * lisp/progmodes/elixir-ts-mode.el:
>>    (elixir-ts--treesit-range-rules): Add underscore in front of the name
>>    capture, so Emacs won't put heex parser on it.
>> ---
>> lisp/progmodes/elixir-ts-mode.el | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el
>> index 9804152d9ab..815827ed13c 100644
>> --- a/lisp/progmodes/elixir-ts-mode.el
>> +++ b/lisp/progmodes/elixir-ts-mode.el
>> @@ -572,7 +572,9 @@
>>     (treesit-range-rules
>>      :embed 'heex
>>      :host 'elixir
>> -     '((sigil (sigil_name) @name (:match "^[HF]$" @name) (quoted_content) @heex)))))
>> +     '((sigil (sigil_name) @_name
>> +              (:match "^[HF]$" @_name)
>> +              (quoted_content) @heex)))))
>> 
>> (defvar heex-ts--sexp-regexp)
>> (defvar heex-ts--indent-rules)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-11  3:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <172585397252.25544.14799687468267584593@vcs2.savannah.gnu.org>
     [not found] ` <20240909035253.23A45C41F2E@vcs2.savannah.gnu.org>
2024-09-09  3:58   ` emacs-30 3fcec09f754 2/4: Add debugging function for treesit.c Po Lu via Emacs development discussions.
2024-09-09  4:13     ` Yuan Fu
2024-09-09 11:55     ` Eli Zaretskii
     [not found] ` <20240909035253.077E8C41F21@vcs2.savannah.gnu.org>
2024-09-09 23:00   ` emacs-30 0fd259d166c 1/4: Fix elixir-ts-mode's range query john muhl
2024-09-11  3:08     ` Yuan Fu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).