From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#73324: 30.0.91; php-ts-mode: regression due to the latest patches for treesitter.c? Date: Fri, 20 Sep 2024 01:29:13 -0700 Message-ID: <1F4102E8-6311-4EFD-985A-D214C4F8863C@gmail.com> References: <24215349.4csPzL39Zc@fedora> <23907479-DDAC-4960-9222-0025826BFAC5@gmail.com> <5426434.OV4Wx5bFTl@3-191.divsi.unimi.it> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9742"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73324@debbugs.gnu.org To: Vincenzo Pupillo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 20 10:31:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1srZ2j-0002NS-0c for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Sep 2024 10:31:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srZ2M-0000IH-8c; Fri, 20 Sep 2024 04:30:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srZ2K-0000HS-8o for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 04:30:44 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1srZ2J-0007Xx-Sh for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 04:30:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=ZfseLqpEfI5VXfz1eXy2CaTFxFv/zd+hXGyTnk7oe50=; b=CMn4mo2QqTvTq33K0+9k+8+S7rk3gSQJWMkV2HnLwouSvbYZ+pAORYdg6IP1eEkSs4liwrP518nxsC78jUb/CBWZ7v9Swa+xitLibmiEGGkE0YgdKcOAjHie5usg4OiXZhP4KoKw1X1ATVnCT6Mu04DHfXfIGnZMKLXLLbOetWyZ96FUb1U0V4AXHDuO8X9kcJezBhPgFjFEeaN0CLC5zFgVtqWgRt31qcriU0tqrwOs7/ht5pN1Id5xQEWMu3HqKmrcB/t18TAtBO70T5HOVgRwH/S2h6iN/UEGNCpA45ilhLQIYAjqkg9SUYzjkfD1iaXuvmb/atdvSYs7PJe3zg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srZ2c-00030K-CN for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 04:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2024 08:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73324 X-GNU-PR-Package: emacs Original-Received: via spool by 73324-submit@debbugs.gnu.org id=B73324.172682105111529 (code B ref 73324); Fri, 20 Sep 2024 08:31:02 +0000 Original-Received: (at 73324) by debbugs.gnu.org; 20 Sep 2024 08:30:51 +0000 Original-Received: from localhost ([127.0.0.1]:34007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srZ2R-0002zt-Az for submit@debbugs.gnu.org; Fri, 20 Sep 2024 04:30:51 -0400 Original-Received: from mail-pl1-f173.google.com ([209.85.214.173]:60548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srZ2Q-0002zd-44 for 73324@debbugs.gnu.org; Fri, 20 Sep 2024 04:30:50 -0400 Original-Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2059204f448so16383075ad.0 for <73324@debbugs.gnu.org>; Fri, 20 Sep 2024 01:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726820965; x=1727425765; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZfseLqpEfI5VXfz1eXy2CaTFxFv/zd+hXGyTnk7oe50=; b=BTGvvm0Pvkc9BZ2bosY7afspWjWcBauDERzgPXhS4NMItGgrA0cJUWmVF08v16t93o FJ3WE/p4qWQFC0w0742emuleOadKwHKKFaJGQHmXOXQhBKpRWVM3PcWHoGDKhVcTc+7A E6+Ozt4kb9ZVF/9Y9ABuSOvT/y8DTjmCbAQVLNT7dbgn1MurU2AKW0TapWhADiS0vTwT qFpg5U2ha8FBKRn0WUcal/i1vIDi6mVBwBvYQONRDQpApUrq3cKG9LCBAOwv28tVl80d cmYLFjdV56+18IDTtGB0J6Bs81EGCXVNVO4+2D5tVwesRhX3vq00v+/dRx0JkOVL7kN7 GBiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726820965; x=1727425765; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZfseLqpEfI5VXfz1eXy2CaTFxFv/zd+hXGyTnk7oe50=; b=q1f/KV/Lu2REZHNVXdIfDfMAoZMmC2KTbK7B5OckdNQQD0EgD1lPk+yBRKOSoKJWiZ eFokMr3AfqQtTJbMkbHxPMchgMpwW1Fv1boFintrv+pFrNCAbtSaWlyvdEAb7jILDR2/ wjdGkZi7vpncskX1z1Yy587crbyRCDp/E6bf14g0AUcAMt7oecn4mqJTmUgpPm/SF/MN IAelxvp6FSLSSENeMjp2Zb9i9fR+IhopZjgN8xfXYyR5zVlBnXoo0CRgqLda/tkS99i8 RQ5FANa/QGLbHyya2Rjj4BVmsNwYF4xXzKoD51HXPMiDqEIp1GWr/hi9n6oNIqsmkpad qBdA== X-Gm-Message-State: AOJu0YyJAOIR0gZ+rUbi/66kOimpguqz52X5MoLaJHlBix9dIkEFx33p vaMiZ4tYVICFmxRZeVG1FBPpxJdaGRrEHrjwEhAx27U15niF3cQD X-Google-Smtp-Source: AGHT+IFaPOui1QuWgam6pp/UEwPWrpk1kIGnRFKWikroFhsiRIgmM+xtP3sZ/hE1su5Ij4SnkH+fJA== X-Received: by 2002:a17:903:188:b0:202:508c:b5a6 with SMTP id d9443c01a7336-208d986a558mr20144015ad.46.1726820965509; Fri, 20 Sep 2024 01:29:25 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:b925:297e:910c:4115]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2079470f41bsm90886765ad.234.2024.09.20.01.29.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Sep 2024 01:29:24 -0700 (PDT) In-Reply-To: <5426434.OV4Wx5bFTl@3-191.divsi.unimi.it> X-Mailer: Apple Mail (2.3776.700.51) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292093 Archived-At: > On Sep 18, 2024, at 3:16=E2=80=AFAM, Vincenzo Pupillo = wrote: >=20 > In data mercoled=C3=AC 18 settembre 2024 06:26:40 CEST, Yuan Fu ha = scritto: >>=20 >>> On Sep 17, 2024, at 1:29=E2=80=AFPM, Vincenzo Pupillo = wrote: >>>=20 >>> Ciao, >>> php-ts-mode no longer behaves as it used to. There seems to be some = problems=20 >>> with the calculation of ranges covered by the parsers. In the image = I attached=20 >>> you can see how the code is being parsed by both the php and = javascript=20 >>> parsers. The namespace declaration has some elements colored as if = they were=20 >>> escape sequences. >>> The php-ts-mode--get-parser-ranges function returns the following = ranges: >>>=20 >>> ((# nil) (# nil) = (#>> parser for javascript> nil) (# nil) = (#>> for phpdoc> ((368 . 426))) (# ((368 . = 426)))) >>>=20 >>> 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. >>>=20 >>> Any ideas about this? >>> The parsers were installed with php-ts-mode-install-parser. >>>=20 >>> GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version = 3.24.43, cairo=20 >>> version 1.18.0) of 2024-09-17, libtree-sitter-0.22.5-1.fc40.x86_64 >>>=20 >>>=20 >>> Thanks. >>>=20 >>> Vincenzo >>=20 >> I couldn=E2=80=99t 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 :-) >=20 > Thank you Yuan!=20 >=20 > 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: > ((# ((2 . 483))) (# = ((1 . 1))) (# ((1 . 1))) = (# nil) (# ((377 . = 435)))) Ok, yeah, I can reproduce this now! Working on it. Yuan=