all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6
@ 2024-07-29 22:17 Gonzalo Larumbe
  2024-08-27  8:22 ` Yuan Fu
  0 siblings, 1 reply; 5+ messages in thread
From: Gonzalo Larumbe @ 2024-07-29 22:17 UTC (permalink / raw)
  To: 72359


[-- Attachment #1.1: Type: text/plain, Size: 517 bytes --]

Hi,

After updating tree-sitter on Arch Linux from 0.22.1 to 0.22.6 there seems
to be an error with the detection of some comment nodes under
`vhdl-ts-mode`.

In the attached VHDL file, if placing the cursor at the comment of line 10,
running:
`(treesit-node-at (point) 'vhdl)` returns `#<treesit-node block_header in
329-358>`. However, the side by side view shows that the parser correctly
detects a comment (see attached screenshot). This worked well with the
previous tree-sitter version.

Thanks a lot!

Gonzalo

[-- Attachment #1.2: Type: text/html, Size: 696 bytes --]

[-- Attachment #2: treesit-vhdl-bug.vhdl --]
[-- Type: text/x-vhdl, Size: 723 bytes --]

architecture STRUCTURE of X_GATE is
    -- global declarations of signal:
    signal A, B : BIT;
begin
    LEVEL1 : block
        -- local declaration of generic parameters
        generic (GB1, GB2 : Time);
            -- local binding of generic parameters
        generic map (GB1 => LongTime, GB2 => ShortTime);
            -- local declaration of ports
        port (PB1: in BIT; PB2 : inout BIT );
            -- local binding of ports and signals
        port map (PB1 => P1, PB2 => B);
        -- local declarations:
        constant Delay : Time := 1 ms;
        signal S1 : BIT;
    begin
        S1 <= PB1 after Delay;
        PB2 <= S1 after GB1, P1 after GB2;
    end block LEVEL1;
end architecture STRUCTURE;

[-- Attachment #3: treesit-bug.PNG --]
[-- Type: image/png, Size: 258484 bytes --]

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

* bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6
  2024-07-29 22:17 bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6 Gonzalo Larumbe
@ 2024-08-27  8:22 ` Yuan Fu
  2024-08-29 12:07   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Yuan Fu @ 2024-08-27  8:22 UTC (permalink / raw)
  To: Gonzalo Larumbe; +Cc: 72359



> On Jul 29, 2024, at 3:17 PM, Gonzalo Larumbe <gonzalomlarumbe@gmail.com> wrote:
> 
> Hi,
> 
> After updating tree-sitter on Arch Linux from 0.22.1 to 0.22.6 there seems to be an error with the detection of some comment nodes under `vhdl-ts-mode`.
> 
> In the attached VHDL file, if placing the cursor at the comment of line 10, running:
> `(treesit-node-at (point) 'vhdl)` returns `#<treesit-node block_header in 329-358>`. However, the side by side view shows that the parser correctly detects a comment (see attached screenshot). This worked well with the previous tree-sitter version.
> Thanks a lot!
> 
> Gonzalo
> 
> <treesit-vhdl-bug.vhdl><treesit-bug.PNG>

Thank you for your report, Gonzalo! And sorry for the delay. I properly looked into this today, and confirmed that this is a tree-sitter bug. I raised an issue here: https://github.com/tree-sitter/tree-sitter/issues/3555

Sadly, there’s not much we can do right now. There was another similar bug in tree-sitter, which I worked around by using another function. But now that “another function” is also broken, oh well :-(

Yuan




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

* bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6
  2024-08-27  8:22 ` Yuan Fu
@ 2024-08-29 12:07   ` Eli Zaretskii
  2024-09-02 17:59     ` Yuan Fu
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-08-29 12:07 UTC (permalink / raw)
  To: Yuan Fu; +Cc: gonzalomlarumbe, 72359-done

> Cc: 72359@debbugs.gnu.org
> From: Yuan Fu <casouri@gmail.com>
> Date: Tue, 27 Aug 2024 01:22:42 -0700
> 
> Thank you for your report, Gonzalo! And sorry for the delay. I properly looked into this today, and confirmed that this is a tree-sitter bug. I raised an issue here: https://github.com/tree-sitter/tree-sitter/issues/3555
> 
> Sadly, there’s not much we can do right now. There was another similar bug in tree-sitter, which I worked around by using another function. But now that “another function” is also broken, oh well :-(

Since this is not an Emacs bug, I'm closing it.





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

* bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6
  2024-08-29 12:07   ` Eli Zaretskii
@ 2024-09-02 17:59     ` Yuan Fu
  2024-09-13 11:50       ` Gonzalo Larumbe
  0 siblings, 1 reply; 5+ messages in thread
From: Yuan Fu @ 2024-09-02 17:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 72359, Gonzalo Larumbe



> On Aug 29, 2024, at 5:07 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Cc: 72359@debbugs.gnu.org
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Tue, 27 Aug 2024 01:22:42 -0700
>> 
>> Thank you for your report, Gonzalo! And sorry for the delay. I properly looked into this today, and confirmed that this is a tree-sitter bug. I raised an issue here: https://github.com/tree-sitter/tree-sitter/issues/3555
>> 
>> Sadly, there’s not much we can do right now. There was another similar bug in tree-sitter, which I worked around by using another function. But now that “another function” is also broken, oh well :-(
> 
> Since this is not an Emacs bug, I'm closing it.

FYI tree-sitter devs have fixed the bug: https://github.com/tree-sitter/tree-sitter/issues/3555

Yuan




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

* bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6
  2024-09-02 17:59     ` Yuan Fu
@ 2024-09-13 11:50       ` Gonzalo Larumbe
  0 siblings, 0 replies; 5+ messages in thread
From: Gonzalo Larumbe @ 2024-09-13 11:50 UTC (permalink / raw)
  To: Yuan Fu; +Cc: Eli Zaretskii, 72359

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

Thanks a lot! :)

El lun, 2 sept 2024 a las 19:59, Yuan Fu (<casouri@gmail.com>) escribió:

>
>
> > On Aug 29, 2024, at 5:07 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> >> Cc: 72359@debbugs.gnu.org
> >> From: Yuan Fu <casouri@gmail.com>
> >> Date: Tue, 27 Aug 2024 01:22:42 -0700
> >>
> >> Thank you for your report, Gonzalo! And sorry for the delay. I properly
> looked into this today, and confirmed that this is a tree-sitter bug. I
> raised an issue here:
> https://github.com/tree-sitter/tree-sitter/issues/3555
> >>
> >> Sadly, there’s not much we can do right now. There was another similar
> bug in tree-sitter, which I worked around by using another function. But
> now that “another function” is also broken, oh well :-(
> >
> > Since this is not an Emacs bug, I'm closing it.
>
> FYI tree-sitter devs have fixed the bug:
> https://github.com/tree-sitter/tree-sitter/issues/3555
>
> Yuan

[-- Attachment #2: Type: text/html, Size: 1669 bytes --]

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 22:17 bug#72359: treesit-node-at-point bug on vhdl-ts-mode after update to 0.22.6 Gonzalo Larumbe
2024-08-27  8:22 ` Yuan Fu
2024-08-29 12:07   ` Eli Zaretskii
2024-09-02 17:59     ` Yuan Fu
2024-09-13 11:50       ` Gonzalo Larumbe

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.