GNU bug report logs -
#73324
30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c?
Previous Next
Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Date: Tue, 17 Sep 2024 20:30:02 UTC
Severity: normal
Found in version 30.0.91
Done: Yuan Fu <casouri <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 73324 in the body.
You can then email your comments to 73324 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73324
; Package
emacs
.
(Tue, 17 Sep 2024 20:30:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vincenzo Pupillo <v.pupillo <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 17 Sep 2024 20:30:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ciao,
php-ts-mode no longer behaves as it used to. There seems to be some problems
with the calculation of ranges covered by the parsers. In the image I attached
you can see how the code is being parsed by both the php and javascript
parsers. The namespace declaration has some elements colored as if they were
escape sequences.
The php-ts-mode--get-parser-ranges function returns the following ranges:
((#<treesit-parser for html> nil) (#<treesit-parser for css> nil) (#<treesit-
parser for javascript> nil) (#<treesit-parser for php> nil) (#<treesit-parser
for phpdoc> ((368 . 426))) (#<treesit-parser for jsdoc> ((368 . 426))))
The range for 'jsdoc' is wrong, there should be only the range for 'phpdoc'.
The attached gif screencast shows the strange behavior in updating the font-
lock.
It doesn't happen all the time. I'm trying to isolate the problem.
Any ideas about this?
The parsers were installed with php-ts-mode-install-parser.
GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo
version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64
Thanks.
Vincenzo
[range_issue_1.png (image/png, attachment)]
[reange_issue_2.gif (image/gif, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73324
; Package
emacs
.
(Tue, 17 Sep 2024 20:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Sorry, I forgot to attach the php file.
In data martedì 17 settembre 2024 22:29:14 CEST, Vincenzo Pupillo ha scritto:
> Ciao,
> php-ts-mode no longer behaves as it used to. There seems to be some problems
> with the calculation of ranges covered by the parsers. In the image I
> attached you can see how the code is being parsed by both the php and
> javascript parsers. The namespace declaration has some elements colored as
> if they were escape sequences.
> The php-ts-mode--get-parser-ranges function returns the following ranges:
>
> ((#<treesit-parser for html> nil) (#<treesit-parser for css> nil)
> (#<treesit- parser for javascript> nil) (#<treesit-parser for php> nil)
> (#<treesit-parser for phpdoc> ((368 . 426))) (#<treesit-parser for jsdoc>
> ((368 . 426))))
>
> The range for 'jsdoc' is wrong, there should be only the range for 'phpdoc'.
> The attached gif screencast shows the strange behavior in updating the
> font- lock.
> It doesn't happen all the time. I'm trying to isolate the problem.
>
> Any ideas about this?
> The parsers were installed with php-ts-mode-install-parser.
>
> GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo
> version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64
>
>
> Thanks.
>
> Vincenzo
[namespace.php (application/x-php, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73324
; Package
emacs
.
(Tue, 17 Sep 2024 20:37:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73324
; Package
emacs
.
(Wed, 18 Sep 2024 04:29:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 73324 <at> debbugs.gnu.org (full text, mbox):
> On Sep 17, 2024, at 1:29 PM, Vincenzo Pupillo <v.pupillo <at> gmail.com> wrote:
>
> Ciao,
> php-ts-mode no longer behaves as it used to. There seems to be some problems
> with the calculation of ranges covered by the parsers. In the image I attached
> you can see how the code is being parsed by both the php and javascript
> parsers. The namespace declaration has some elements colored as if they were
> escape sequences.
> The php-ts-mode--get-parser-ranges function returns the following ranges:
>
> ((#<treesit-parser for html> nil) (#<treesit-parser for css> nil) (#<treesit-
> parser for javascript> nil) (#<treesit-parser for php> nil) (#<treesit-parser
> for phpdoc> ((368 . 426))) (#<treesit-parser for jsdoc> ((368 . 426))))
>
> The range for 'jsdoc' is wrong, there should be only the range for 'phpdoc'.
> The attached gif screencast shows the strange behavior in updating the font-
> lock.
> It doesn't happen all the time. I'm trying to isolate the problem.
>
> Any ideas about this?
> The parsers were installed with php-ts-mode-install-parser.
>
> GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo
> version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64
>
>
> Thanks.
>
> Vincenzo<range_issue_1.png><reange_issue_2.gif>
I couldn’t reproduce this but I have some suspicion. I pushed a change to emacs-30, please try to use that and see if you can still occasionally reproduce. Thanks! And sorry for breaking it :-)
Yuan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73324
; Package
emacs
.
(Wed, 18 Sep 2024 10:18:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 73324 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
In data mercoledì 18 settembre 2024 06:26:40 CEST, Yuan Fu ha scritto:
>
> > On Sep 17, 2024, at 1:29 PM, Vincenzo Pupillo <v.pupillo <at> gmail.com> wrote:
> >
> > Ciao,
> > php-ts-mode no longer behaves as it used to. There seems to be some problems
> > with the calculation of ranges covered by the parsers. In the image I attached
> > you can see how the code is being parsed by both the php and javascript
> > parsers. The namespace declaration has some elements colored as if they were
> > escape sequences.
> > The php-ts-mode--get-parser-ranges function returns the following ranges:
> >
> > ((#<treesit-parser for html> nil) (#<treesit-parser for css> nil) (#<treesit-
> > parser for javascript> nil) (#<treesit-parser for php> nil) (#<treesit-parser
> > for phpdoc> ((368 . 426))) (#<treesit-parser for jsdoc> ((368 . 426))))
> >
> > The range for 'jsdoc' is wrong, there should be only the range for 'phpdoc'.
> > The attached gif screencast shows the strange behavior in updating the font-
> > lock.
> > It doesn't happen all the time. I'm trying to isolate the problem.
> >
> > Any ideas about this?
> > The parsers were installed with php-ts-mode-install-parser.
> >
> > GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo
> > version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64
> >
> >
> > Thanks.
> >
> > Vincenzo<range_issue_1.png><reange_issue_2.gif>
>
> I couldn’t reproduce this but I have some suspicion. I pushed a change to emacs-30, please try to use that and see if you can still occasionally reproduce. Thanks! And sorry for breaking it :-)
Thank you Yuan!
It works better, but the range update seems to be delayed or not triggered by e.g. yank or undo, as you can see in the attached screencast.
After the yank the ranges are:
((#<treesit-parser for html> ((2 . 483))) (#<treesit-parser for css> ((1 . 1))) (#<treesit-parser for javascript> ((1 . 1))) (#<treesit-parser for php> nil) (#<treesit-parser for phpdoc> ((377 . 435))))
Vincenzo
>
> Yuan
>
[range_issue_3.gif (image/gif, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73324
; Package
emacs
.
(Fri, 20 Sep 2024 08:31:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 73324 <at> debbugs.gnu.org (full text, mbox):
> On Sep 18, 2024, at 3:16 AM, Vincenzo Pupillo <v.pupillo <at> gmail.com> wrote:
>
> In data mercoledì 18 settembre 2024 06:26:40 CEST, Yuan Fu ha scritto:
>>
>>> On Sep 17, 2024, at 1:29 PM, Vincenzo Pupillo <v.pupillo <at> gmail.com> wrote:
>>>
>>> Ciao,
>>> php-ts-mode no longer behaves as it used to. There seems to be some problems
>>> with the calculation of ranges covered by the parsers. In the image I attached
>>> you can see how the code is being parsed by both the php and javascript
>>> parsers. The namespace declaration has some elements colored as if they were
>>> escape sequences.
>>> The php-ts-mode--get-parser-ranges function returns the following ranges:
>>>
>>> ((#<treesit-parser for html> nil) (#<treesit-parser for css> nil) (#<treesit-
>>> parser for javascript> nil) (#<treesit-parser for php> nil) (#<treesit-parser
>>> for phpdoc> ((368 . 426))) (#<treesit-parser for jsdoc> ((368 . 426))))
>>>
>>> The range for 'jsdoc' is wrong, there should be only the range for 'phpdoc'.
>>> The attached gif screencast shows the strange behavior in updating the font-
>>> lock.
>>> It doesn't happen all the time. I'm trying to isolate the problem.
>>>
>>> Any ideas about this?
>>> The parsers were installed with php-ts-mode-install-parser.
>>>
>>> GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo
>>> version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64
>>>
>>>
>>> Thanks.
>>>
>>> Vincenzo<range_issue_1.png><reange_issue_2.gif>
>>
>> I couldn’t reproduce this but I have some suspicion. I pushed a change to emacs-30, please try to use that and see if you can still occasionally reproduce. Thanks! And sorry for breaking it :-)
>
> Thank you Yuan!
>
> It works better, but the range update seems to be delayed or not triggered by e.g. yank or undo, as you can see in the attached screencast.
> After the yank the ranges are:
> ((#<treesit-parser for html> ((2 . 483))) (#<treesit-parser for css> ((1 . 1))) (#<treesit-parser for javascript> ((1 . 1))) (#<treesit-parser for php> nil) (#<treesit-parser for phpdoc> ((377 . 435))))
Ok, yeah, I can reproduce this now! Working on it.
Yuan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73324
; Package
emacs
.
(Sat, 21 Sep 2024 03:58:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 73324 <at> debbugs.gnu.org (full text, mbox):
> On Sep 20, 2024, at 1:29 AM, Yuan Fu <casouri <at> gmail.com> wrote:
>
>
>
>> On Sep 18, 2024, at 3:16 AM, Vincenzo Pupillo <v.pupillo <at> gmail.com> wrote:
>>
>> In data mercoledì 18 settembre 2024 06:26:40 CEST, Yuan Fu ha scritto:
>>>
>>>> On Sep 17, 2024, at 1:29 PM, Vincenzo Pupillo <v.pupillo <at> gmail.com> wrote:
>>>>
>>>> Ciao,
>>>> php-ts-mode no longer behaves as it used to. There seems to be some problems
>>>> with the calculation of ranges covered by the parsers. In the image I attached
>>>> you can see how the code is being parsed by both the php and javascript
>>>> parsers. The namespace declaration has some elements colored as if they were
>>>> escape sequences.
>>>> The php-ts-mode--get-parser-ranges function returns the following ranges:
>>>>
>>>> ((#<treesit-parser for html> nil) (#<treesit-parser for css> nil) (#<treesit-
>>>> parser for javascript> nil) (#<treesit-parser for php> nil) (#<treesit-parser
>>>> for phpdoc> ((368 . 426))) (#<treesit-parser for jsdoc> ((368 . 426))))
>>>>
>>>> The range for 'jsdoc' is wrong, there should be only the range for 'phpdoc'.
>>>> The attached gif screencast shows the strange behavior in updating the font-
>>>> lock.
>>>> It doesn't happen all the time. I'm trying to isolate the problem.
>>>>
>>>> Any ideas about this?
>>>> The parsers were installed with php-ts-mode-install-parser.
>>>>
>>>> GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo
>>>> version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> Vincenzo<range_issue_1.png><reange_issue_2.gif>
>>>
>>> I couldn’t reproduce this but I have some suspicion. I pushed a change to emacs-30, please try to use that and see if you can still occasionally reproduce. Thanks! And sorry for breaking it :-)
>>
>> Thank you Yuan!
>>
>> It works better, but the range update seems to be delayed or not triggered by e.g. yank or undo, as you can see in the attached screencast.
>> After the yank the ranges are:
>> ((#<treesit-parser for html> ((2 . 483))) (#<treesit-parser for css> ((1 . 1))) (#<treesit-parser for javascript> ((1 . 1))) (#<treesit-parser for php> nil) (#<treesit-parser for phpdoc> ((377 . 435))))
>
>
> Ok, yeah, I can reproduce this now! Working on it.
>
> Yuan
It should be fixed now on emacs-30.
Yuan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73324
; Package
emacs
.
(Sat, 21 Sep 2024 10:19:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 73324 <at> debbugs.gnu.org (full text, mbox):
In data sabato 21 settembre 2024 05:55:22 CEST, Yuan Fu ha scritto:
> >> It works better, but the range update seems to be delayed or not
> >> triggered by e.g. yank or undo, as you can see in the attached
> >> screencast. After the yank the ranges are:
> >> ((#<treesit-parser for html> ((2 . 483))) (#<treesit-parser for css> ((1
> >> . 1))) (#<treesit-parser for javascript> ((1 . 1))) (#<treesit-parser
> >> for php> nil) (#<treesit-parser for phpdoc> ((377 . 435))))>
> > Ok, yeah, I can reproduce this now! Working on it.
> >
> > Yuan
>
> It should be fixed now on emacs-30.
Yes, it works.
Thank you Yuan.
Vincenzo
>
> Yuan
Reply sent
to
Yuan Fu <casouri <at> gmail.com>
:
You have taken responsibility.
(Sun, 22 Sep 2024 06:48:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Vincenzo Pupillo <v.pupillo <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 22 Sep 2024 06:48:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 73324-done <at> debbugs.gnu.org (full text, mbox):
> On Sep 21, 2024, at 3:17 AM, Vincenzo Pupillo <v.pupillo <at> gmail.com> wrote:
>
> In data sabato 21 settembre 2024 05:55:22 CEST, Yuan Fu ha scritto:
>>>> It works better, but the range update seems to be delayed or not
>>>> triggered by e.g. yank or undo, as you can see in the attached
>>>> screencast. After the yank the ranges are:
>>>> ((#<treesit-parser for html> ((2 . 483))) (#<treesit-parser for css> ((1
>>>> . 1))) (#<treesit-parser for javascript> ((1 . 1))) (#<treesit-parser
>>>> for php> nil) (#<treesit-parser for phpdoc> ((377 . 435))))>
>>> Ok, yeah, I can reproduce this now! Working on it.
>>>
>>> Yuan
>>
>> It should be fixed now on emacs-30.
> Yes, it works.
> Thank you Yuan.
Great! Closing this report.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 20 Oct 2024 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.