unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Vincenzo Pupillo <v.pupillo@gmail.com>
Cc: 73324@debbugs.gnu.org
Subject: bug#73324: 30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c?
Date: Tue, 17 Sep 2024 21:26:40 -0700	[thread overview]
Message-ID: <23907479-DDAC-4960-9222-0025826BFAC5@gmail.com> (raw)
In-Reply-To: <24215349.4csPzL39Zc@fedora>



> On Sep 17, 2024, at 1:29 PM, Vincenzo Pupillo <v.pupillo@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




  parent reply	other threads:[~2024-09-18  4:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-17 20:29 bug#73324: 30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c? Vincenzo Pupillo
2024-09-17 20:35 ` Vincenzo Pupillo
2024-09-18  4:26 ` Yuan Fu [this message]
2024-09-18 10:16   ` Vincenzo Pupillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23907479-DDAC-4960-9222-0025826BFAC5@gmail.com \
    --to=casouri@gmail.com \
    --cc=73324@debbugs.gnu.org \
    --cc=v.pupillo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).