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 20:55:22 -0700 Message-ID: References: <24215349.4csPzL39Zc@fedora> <23907479-DDAC-4960-9222-0025826BFAC5@gmail.com> <5426434.OV4Wx5bFTl@3-191.divsi.unimi.it> <1F4102E8-6311-4EFD-985A-D214C4F8863C@gmail.com> 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="5360"; 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 Sat Sep 21 05:58:05 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 1srrG1-0001EJ-3G for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Sep 2024 05:58:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srrFh-0001El-6u; Fri, 20 Sep 2024 23:57:45 -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 1srrFf-0001EL-Bz for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 23:57:43 -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 1srrFf-00014l-30 for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 23:57:43 -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=tYdLp/eY79YLY+S7TjTxhadfxrQ9FfJG1H1utoYWiAQ=; b=droWcY8ez+EATJEtzRQrSKe9AjiKcLpvpzaGfBR8T53SW9sKp/OaOdBEvYYto838fxS2jCwk7Wv2sGduvQgH8L6s7sXRC5Um1uVWLy2qUFBjFjlkoGH5tJly9e1ZBdsPRyTSpHfHJN0ILmVQ7H5/HIBwpbXGK0EHaf3JaXXmw7lkmZIq4N+Dr97dXzjW36lzxdwMx+tVXSMrWUmc3z38pBmLBcyKKvAl40SnVfDTz98vi6VhtpXrE82Qer4xKN4XODPqJwwbnrl9aU7MJHTQfcQyg0bQm2YA6D3mP8/52N0w5h7XCcDpMpWcgae0wY1GBab40ghlt0i2ivfjsazOfg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srrFy-0001Eb-Fq for bug-gnu-emacs@gnu.org; Fri, 20 Sep 2024 23:58: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: Sat, 21 Sep 2024 03:58: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.17268910224655 (code B ref 73324); Sat, 21 Sep 2024 03:58:02 +0000 Original-Received: (at 73324) by debbugs.gnu.org; 21 Sep 2024 03:57:02 +0000 Original-Received: from localhost ([127.0.0.1]:36865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srrEz-0001Co-Gr for submit@debbugs.gnu.org; Fri, 20 Sep 2024 23:57:02 -0400 Original-Received: from mail-pl1-f172.google.com ([209.85.214.172]:47223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srrEx-0001CV-MO for 73324@debbugs.gnu.org; Fri, 20 Sep 2024 23:57:00 -0400 Original-Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2054e22ce3fso27502395ad.2 for <73324@debbugs.gnu.org>; Fri, 20 Sep 2024 20:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726890934; x=1727495734; 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=tYdLp/eY79YLY+S7TjTxhadfxrQ9FfJG1H1utoYWiAQ=; b=JeEXYaXs87IHHoe6CfCcKyvEkiYP3IVJ9Wnz8bhZKY91bwOkCGd/JhJBuBlDLwXFuZ WGg9kkeLsgsneLYpCen//kfFsISR9pxJbwl3nud+0nojgxbYOHY6x99nwD/PyLUx8vtl GazCifOskxoiWZz05Eur8qYZTRCTBxbSkXdoWtZP4/ae0tfilAfn/5ZPgXuK/QmTgl1n QyEpooehXnvQoakQryuLEAFffi7gnINB1sIPoilT/f+hSIS/zzebBon8i4AKLKVbL7C4 7K9tvklPpLR28aHlP4WpaUMINNcbT62hNc3gkTwXUZBn2EM5nR065eL2vSzg9tT8KnR4 0XlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726890934; x=1727495734; 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=tYdLp/eY79YLY+S7TjTxhadfxrQ9FfJG1H1utoYWiAQ=; b=XKF3AVt8rws8HN0COgaMoq42K+xPiRcHAa2dV704f8j7f48EZZrP2CkeoNV5oVhnKC 4Wb1BrAPQ4OeTkmi6UR7Do94KeweGBwZWVSbq3K4WGoCkDa8C4g60kXhy14B+ZHX2WGu /u/E0DfauXkn5SGpHS1O2puT+cTIExn/yoTxg3npmgYyaf0p8eHKRTQiNrLpwtgsthDi 2HqnZroVeI4S7ubAcAH353jAedHBne2UZ7ibAqlmRmtSava5+9cxb2clUWYBFM/zFwO3 AstwhK24oHZY/mkjBW6SSamFdwBbNjogdur+WPa4zsUj1tw2Ha7MCZ4m6KyF21MxzUm3 5OMw== X-Gm-Message-State: AOJu0YyGjXSMnuaE/MHLFy66svTZChTJvSTJrdmBwyZde0WSaCLQGGzd u0zjyLTx9CG/++VW7eX6ZGPQcXgE8x+N4imQh6AGlVnQyPDF3Xcm X-Google-Smtp-Source: AGHT+IHBlnVPsaQnH7HOkle7HN50TOUysRi+Sbg/KrgbXFFE/ti6t5Jgc4d8tN3qbPQc+rzWgssRYA== X-Received: by 2002:a17:903:124a:b0:205:6f3c:4a65 with SMTP id d9443c01a7336-208d8306ee6mr66854155ad.2.1726890933878; Fri, 20 Sep 2024 20:55:33 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:b925:297e:910c:4115]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-207945dcbdfsm102058195ad.32.2024.09.20.20.55.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Sep 2024 20:55:33 -0700 (PDT) In-Reply-To: <1F4102E8-6311-4EFD-985A-D214C4F8863C@gmail.com> 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:292141 Archived-At: > On Sep 20, 2024, at 1:29=E2=80=AFAM, Yuan Fu = wrote: >=20 >=20 >=20 >> 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)))) >=20 >=20 > Ok, yeah, I can reproduce this now! Working on it. >=20 > Yuan It should be fixed now on emacs-30. Yuan