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#64818: 30.0.50; c++-ts-mode highlight does not work Date: Mon, 24 Jul 2023 19:08:44 +0300 Message-ID: <83wmypqokz.fsf@gnu.org> References: <83sf9dsewi.fsf@gnu.org> <87ila9sann.fsf@thornhill.no> <834jlts9q0.fsf@gnu.org> <87pm4h5qk2.fsf@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11268"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64818@debbugs.gnu.org, dianchengwang@gmail.com, casouri@gmail.com To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 24 18:09:25 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 1qNy7g-0002ZI-Kg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Jul 2023 18:09:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNy7N-0005cb-Jp; Mon, 24 Jul 2023 12:09: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 1qNy7K-0005cM-TZ for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 12:09: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 1qNy7K-0004cs-M7 for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 12:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNy7K-0004En-93 for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 12:09: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: Mon, 24 Jul 2023 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64818 X-GNU-PR-Package: emacs Original-Received: via spool by 64818-submit@debbugs.gnu.org id=B64818.169021489016211 (code B ref 64818); Mon, 24 Jul 2023 16:09:02 +0000 Original-Received: (at 64818) by debbugs.gnu.org; 24 Jul 2023 16:08:10 +0000 Original-Received: from localhost ([127.0.0.1]:43833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNy6U-0004DP-4q for submit@debbugs.gnu.org; Mon, 24 Jul 2023 12:08:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNy6R-0004Cu-7D for 64818@debbugs.gnu.org; Mon, 24 Jul 2023 12:08:09 -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 1qNy6L-0004Tz-JW; Mon, 24 Jul 2023 12:08:01 -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=6khvZF5xRICO3rYDhuWG35LEB0KJWWHeQFMi4CcoQwY=; b=cUgqYXMBndtl uOZeE9j6wZKfyTYisv9kOSXQno1zvMzNc2OGGvywrO5d3jGkURToKrfJbUpY7nyjt8x2kO6XEPBc/ keQreTZkXl9h/0HQ4umYnlVJuGFvaXIxMzshW3feBj+0/N7UmtbEgrMYg0zEaf3eDGXh44tk4SAqN WNC+OCjlzASRsB7GShzDV/bxwMeqonJuqrOuc0EK/JjPEHGaQjVNf22PZcLd0wkTIMQbZNVJm/dZZ ydiIj83hQtNFwISsquem4lt7vgkYnYA/UU0vYhaSb7IT9QAWxhJbk7e5NalbbnKm2jHQEOkqV9ABl XV47GWkhl4Jb04fSOLWJ7w==; 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 1qNy6L-0004fP-2U; Mon, 24 Jul 2023 12:08:01 -0400 In-Reply-To: <87pm4h5qk2.fsf@thornhill.no> (message from Theodor Thornhill on Mon, 24 Jul 2023 16:31:41 +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:265979 Archived-At: > From: Theodor Thornhill > Cc: dianchengwang@gmail.com, casouri@gmail.com, 64818@debbugs.gnu.org > Date: Mon, 24 Jul 2023 16:31:41 +0200 > > >> Error during redisplay: (jit-lock-function 14) signaled (treesit-query-error "Node type error at" 99 "(true) > >> @font-lock-constant-face (false) @font-lock-constant-face (null) @font-lock-constant-face (nullptr) > >> @font-lock-constant-face" "Debug the query with `treesit-query-validate'") [2 times] > > > Yep, nullptr was changed from named node to unnamed node last week [0]. > > I think we can live without a compat change and only target the node > as a normal keyword. I'll commit the fix if it is simple enough (the > simplest is just to remove the node altogether), > otherwise I'll send a patch for review. Sounds ok? I'd prefer to see the patch. Also, can you tell more about the effect of the change you propose ("remove the node")? More generally, I'm a bit worried by such incompatible changes in the grammar libraries. The developers must understand that they break users of tree-sitter, right? So why are they making such incompatible changes? And how do other editors cope with such changes, for example this one? I'm asking these questions because perhaps we are doing something we shouldn't, or not doing something we should. I don't think we can tell our users to use only a specific commit from the grammar libraries' repositories: a significant portion of Emacs users tend to switch to a new version many moons after the release (e.g., I see reports from people who only now upgrade from Emacs 27 to Emacs 28, more than a year since Emacs 28 was released). So a grammar library which was the current one on the release date will be hopelessly outdated by the time some users will switch to that Emacs version. So we must look for some more robust way, if it exists.