From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64647: treesit-query-error due to a recent change to tree-sitter-javascript grammar definition Date: Sat, 15 Jul 2023 22:16:42 +0300 Message-ID: <83edl9asth.fsf@gnu.org> References: <2171209.irdbgypaU6@fedora> <83y1jhbad1.fsf@gnu.org> <874jm5rrgk.fsf@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1112"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64647@debbugs.gnu.org, v.pupillo@gmail.com, jostein@kjonigsen.net To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 15 21:17:24 2023 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 1qKklg-000AZ2-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jul 2023 21:17:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKklM-0005cL-2Q; Sat, 15 Jul 2023 15:17:04 -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 1qKklK-0005bs-Lk for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 15:17:02 -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 1qKklK-00025q-E1 for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 15:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKklK-000184-6n for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 15:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2023 19:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64647 X-GNU-PR-Package: emacs Original-Received: via spool by 64647-submit@debbugs.gnu.org id=B64647.16894485894297 (code B ref 64647); Sat, 15 Jul 2023 19:17:02 +0000 Original-Received: (at 64647) by debbugs.gnu.org; 15 Jul 2023 19:16:29 +0000 Original-Received: from localhost ([127.0.0.1]:46097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKkkn-00017E-7B for submit@debbugs.gnu.org; Sat, 15 Jul 2023 15:16:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKkkk-000170-VV for 64647@debbugs.gnu.org; Sat, 15 Jul 2023 15:16:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKkkf-000221-8K; Sat, 15 Jul 2023 15:16:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=cKquB9C2cwvn680veP88W3D2eAeP/54iKMhmba4jG8Y=; b=D7SOJLifYs21 QY1LBwtXNSbcq94lUUDRDKCyYeZqIu67SEo0oemanPenO3MLo537F/d7IDTPgOcWb6FTwyLz6GzqR 3FPC8i1biU+I4AGcK6LIYraQH8RzD4InR5VpnAiuO7RqQzIqkZZ94iE1D1wOweNkfS7tPr5+F1dQg HEUQCSJK5GG02szU8gQFij1qh/zWV37Q+GLXuQ53UaIjqoQevkrmwQCU+1CjMdiqGnH7kASxBo/eg E7LZbwhamRPYdY5ayRBxTC/7CwYeI4U2rsBPSMGIt5FoPG6ObAMMbhMrKcKF33h69coPvTjNZ1/L1 jXPeSxLzMieMPfkCt+YuFw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKkke-0001dd-59; Sat, 15 Jul 2023 15:16:20 -0400 In-Reply-To: <874jm5rrgk.fsf@thornhill.no> (message from Theodor Thornhill on Sat, 15 Jul 2023 19:54:03 +0200) 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:265239 Archived-At: > From: Theodor Thornhill > Cc: Vincenzo Pupillo , Jostein Kjonigsen > , 64647@debbugs.gnu.org > Date: Sat, 15 Jul 2023 19:54:03 +0200 > > Eli Zaretskii writes: > > >> The patch in attachment fixes both problems. > > > > Will the patch work with the grammar libraries before the recent > > change? > > > > It will introduce regressions, but the patch itself is a change for the > better, both in emacs land and in the grammar itself. What kinds of regressions? > I don't disagree, but I think this is a difficult problem to solve, but > with an easy cop-out solution that most other implementors use - just > refer to the last supported commit. We've had some discussions on this, > but IIRC we never settled on anything. Personally, I think a > > ;;; Tree-sitter-version: bb1f97b643b77fc1f082d621bf533b4b14cf0c30 > > header may be the simplest way to at least signal some awareness > here. That way the auto install mechanism can pull that hash directly > and we can ensure some sort of compatibility checking. > > What do you think? I think what I wrote: that we should try to make our modes work with reasonably old versions of the grammars, if that is practical. While in general it could be a very difficult, if not impossible, to achieve that, the question is whether this particular issue can be solved in that manner. If it can, we should do it.