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#69952: [PATCH] Support pdumping compiled queries by dumping their source Date: Sat, 18 May 2024 11:38:11 +0300 Message-ID: <86wmnrecr0.fsf@gnu.org> References: <86r0g1zaqi.fsf@gnu.org> <86le5hr9oj.fsf@gnu.org> <861q709y5y.fsf@gnu.org> <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@gmail.com> <86frvf8gf9.fsf@gnu.org> <86eday6j9o.fsf@gnu.org> <868r157wdy.fsf@gnu.org> <868r0phq6e.fsf@gnu.org> <493C3C1B-74F2-405D-830F-213B4D76DDC1@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27486"; mail-complaints-to="usenet@ciao.gmane.io" Cc: serg.foo@gmail.com, dancol@dancol.org, 69952@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 18 10:39:11 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 1s8Faw-0006uk-RS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 May 2024 10:39:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8Fam-0000En-SC; Sat, 18 May 2024 04:39:00 -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 1s8Fak-0000Dy-Td for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 04:38:58 -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 1s8Fak-0004ZL-Kd for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 04:38:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8Fan-0007cJ-TP for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 04:39:01 -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, 18 May 2024 08:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69952 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 69952-submit@debbugs.gnu.org id=B69952.171602150629269 (code B ref 69952); Sat, 18 May 2024 08:39:01 +0000 Original-Received: (at 69952) by debbugs.gnu.org; 18 May 2024 08:38:26 +0000 Original-Received: from localhost ([127.0.0.1]:60336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8FaD-0007c1-M5 for submit@debbugs.gnu.org; Sat, 18 May 2024 04:38:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8FaB-0007bf-Gz for 69952@debbugs.gnu.org; Sat, 18 May 2024 04:38:23 -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 1s8Fa2-0004Ue-Qc; Sat, 18 May 2024 04:38:14 -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=1JQkPqr6gQR8F3P1v0Apbc4i/63zTGCJ9p1Jp16JJSk=; b=iY5cntTy8b3A iSfLDLSJPk86PT3hVFNbqDMTjSZBy2FOAGVZijN3cS9DOUll93tvIhs29oTq+FugOiB10lL3ec5ti Ij9UKY5EMb8057ar2SmGUDnyp9ku7BcPRtPZNagYJG3tQLi3Y56uMSv9ZwwZZ5ZfclAbseiDehAmi oT0DVONlRXGjLhlEWZyPvCnrjgJPRK5lGBz5vBJ23wQhIMFdAgIrcGz2KCPC6k+9X69J8z3Z9siX7 OzwglGfT78hryFr+xF1FiASmRSq1fyOBopLD8LJyEJ/ICBCwH3K+xxwVeMJcLKF+BAgI1Unzc3pUY S6foxHE0naF8kklnLDGY3w==; In-Reply-To: <493C3C1B-74F2-405D-830F-213B4D76DDC1@gmail.com> (message from Yuan Fu on Sat, 4 May 2024 14:29:06 -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:285295 Archived-At: Ping! > From: Yuan Fu > Date: Sat, 4 May 2024 14:29:06 -0700 > Cc: serg.foo@gmail.com, > dancol@dancol.org, > 69952@debbugs.gnu.org > > > > > On May 4, 2024, at 2:39 AM, Eli Zaretskii wrote: > > > >> From: Yuan Fu > >> Date: Sun, 21 Apr 2024 23:25:10 -0700 > >> Cc: dancol@dancol.org, > >> serg.foo@gmail.com, > >> 69952@debbugs.gnu.org > >> > >>> On Apr 21, 2024, at 11:18 PM, Eli Zaretskii wrote: > >>> > >>> > >>> We cannot safely signal an error at that point, I think, so just > >>> keeping the query as a string should do, as it will then signal an > >>> error at run time when that query is used, is that right? > >> > >> Yes, most likely a function-undefined signal, since all the treesit.c functions like treesit-query-capture or treesit-query-compile will be nonexistent. And usually the Lisp program trying to use the query would check for tree-sitter availability with treesit-available-p before trying to use any tree-sitter functions; so that signal will be usually avoided as well. > > > > Can you suggest such an addition to the patch? > > Let me take a look. > > Yuan