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#71518: 30.0.50; Errors during redisplay with c++-ts-mode Date: Sat, 22 Jun 2024 11:26:43 +0300 Message-ID: <86wmmhidrw.fsf@gnu.org> References: <865xue1gtu.fsf@gnu.org> <26599430.1r3eYUQgxm@3-191.divsi.unimi.it> <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39717"; mail-complaints-to="usenet@ciao.gmane.io" Cc: vincenzo.pupillo@lpsd.it, 71518@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 22 10:28:24 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 1sKw6i-000A4Q-Bl for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jun 2024 10:28:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKw6P-0003JT-1d; Sat, 22 Jun 2024 04:28:05 -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 1sKw6M-0003JD-VM for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 04:28: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 1sKw6M-0002c4-Lk for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 04:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sKw6M-00086Z-2L for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 04:28: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, 22 Jun 2024 08:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71518 X-GNU-PR-Package: emacs Original-Received: via spool by 71518-submit@debbugs.gnu.org id=B71518.171904482231074 (code B ref 71518); Sat, 22 Jun 2024 08:28:02 +0000 Original-Received: (at 71518) by debbugs.gnu.org; 22 Jun 2024 08:27:02 +0000 Original-Received: from localhost ([127.0.0.1]:44231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKw5N-00084v-97 for submit@debbugs.gnu.org; Sat, 22 Jun 2024 04:27:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKw5K-00084c-MR for 71518@debbugs.gnu.org; Sat, 22 Jun 2024 04:27:00 -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 1sKw5F-0002Vv-0r; Sat, 22 Jun 2024 04:26:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=OSlk+NRhMVPU0DL+9s3hiC7xzvXSLyT7WJop82w6NvM=; b=f4yriUAfCcwOdX7v5NYp eedn2iDommq8CCW2sS4CO/GxY6CNPej94ed1qsuycOcmrYFLTShl6CVg5JW+n/Gst61fNqSIfdxLE aZFaMSIycQ/JdYNWfHYCI9MZh+CFXRpVI6eeP/8E+BHdVCM7hTuGZ3cOVoWEkgQ16C1RjnXzRIP9u AcQm8nxrck+zMYOPWt3LaUvTAlFoe7xf81sPKK4kExSsmGkT3eLk/1slYdIN+iIDAGk1H5KKHKUgt xi9QuwKvS34Idx3bMWhR4IKqlGUHhbu2c0wJhw26IBmKj2K2PEfBNmhp1rUCX8utdz6sSeOwqnpDN FeSkjpQZBLMGaw==; In-Reply-To: <7108109B-3AFB-4623-890E-1E19903FA0D0@gmail.com> (message from Yuan Fu on Wed, 12 Jun 2024 23:51:21 -0700) 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:287663 Archived-At: Ping! Any progress with this bug? > From: Yuan Fu > Date: Wed, 12 Jun 2024 23:51:21 -0700 > Cc: 71518@debbugs.gnu.org, > Bug Report Emacs , > Eli Zaretskii > > > > > On Jun 12, 2024, at 6:53 AM, Vincenzo Pupillo wrote: > > > > > > In data mercoledì 12 giugno 2024 14:33:17 CEST, Eli Zaretskii ha scritto: > >> To reproduce in "emacs -Q", visit some C++ source file (I used > >> breakpoint.c from the GDB sources), then turn on c++-ts-mode. The > >> fontification is all incorrect, and *Messages* has these error > >> messages: > >> > >> Error during redisplay: (jit-lock-function 7286) signaled (treesit-query-error "Node type error at" 575 "[\"_Atomic\" \"break\" \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\" \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\" \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\" \"union\" \"volatile\" \"while\" \"and\" \"and_eq\" \"bitand\" \"bitor\" \"catch\" \"class\" \"co_await\" \"co_return\" \"co_yield\" \"compl\" \"concept\" \"consteval\" \"constexpr\" \"constinit\" \"decltype\" \"delete\" \"explicit\" \"final\" \"friend\" \"mutable\" \"namespace\" \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\" \"or\" \"or_eq\" \"override\" \"private\" \"protected\" \"public\" \"requires\" \"template\" \"throw\" \"try\" \"typename\" \"using\" \"virtual\" \"xor\" \"xor_eq\"] @font-lock-keyword-face (auto) @font-lock-keyword-face (this) @font-lock-keyword-face" "Debug the query with `treesit-query-validate'") > >> > >> This happens with the latest C++ tree-sitter grammar library. I guess > >> they made some incompatible change in the grammar or something? > >> > >> > > Yes, they changed the grammar. > > https://github.com/tree-sitter/tree-sitter-cpp/issues/271 > > > > V. > > So it seems “virtual” is now a named node rather than an anonymous node, which is a little odd. I asked the author about it in the GitHub issue, let me clear that up before fixing c-ts-mode. > > And, Eli, we really really should pin tree-sitter grammars. As more people start using tree-sitter modes, they will found out about the breakage before we do and the tree-sitter major mode would be unusable for them before they upgrade their grammar. Most of them will not know how to do it and which commit to downgrade to. And I really don’t want to chase the random changes these grammars make all the time. Fixing for these breakages is arguably a heavier maintenance burden than pinning tree-sitter grammars. > > Yuan