GNU bug report logs - #69952
[PATCH] Support pdumping compiled queries by dumping their source

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Sergey Vinokurov <serg.foo@HIDDEN>; Keywords: patch; dated Sat, 23 Mar 2024 03:29:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 1 Jun 2024 17:09:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 01 13:09:11 2024
Received: from localhost ([127.0.0.1]:57314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sDSEB-0000Hj-It
	for submit <at> debbugs.gnu.org; Sat, 01 Jun 2024 13:09:11 -0400
Received: from mail-il1-f175.google.com ([209.85.166.175]:61732)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1sDSE8-0000HV-Na
 for 69952 <at> debbugs.gnu.org; Sat, 01 Jun 2024 13:09:09 -0400
Received: by mail-il1-f175.google.com with SMTP id
 e9e14a558f8ab-374891eb5d3so8492285ab.3
 for <69952 <at> debbugs.gnu.org>; Sat, 01 Jun 2024 10:08:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1717261671; x=1717866471; 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=zdFQMC+T+Tzhmzuu5ELpd9cZLgFU9TpZmrPLKfAPYvk=;
 b=aruxb8hxEqKLBVx9ADfnnE9rLJ2tuCyWrIQsvNOH50H4W6EAtXz1Mf+OHlkmV0Jse3
 EynxuIb7kzN0gCwS76Zny3hg8xUsrEuyzlkkKlVnIjBGSX/pfCzXjNBbA7qg1tMOr+v4
 DggYKQpj1pQGI42R0GAuGzaj3iSyIQZAAwnxBlvH4BjwUIBO7yZyuwZywuITOWt09T0V
 Fea35IQIi+qbltszjafX7SmxnFglXM/8yEL4h6X6wOd0jK8WbsQiJVjYk9nHjvWbOyo3
 Hes3SMmk7kyzwGXcdrjbucYI0b35bWm/Cs25/Pl2IBQjLoodaQmGIquwZGKX1ZK+QmyX
 Xdag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1717261671; x=1717866471;
 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=zdFQMC+T+Tzhmzuu5ELpd9cZLgFU9TpZmrPLKfAPYvk=;
 b=ez9JjmyrwJTzHXmtAECe8hiIN6iicis0yyac9gW31W7rNu/H2/dVgLyMOObtv1TOhJ
 hr65QiAOtkrVSMVnHUHq1kwC2noKAmW6SNu6r6E+H8722p3Dwt5Bt2X6yP4ZmKTlD6AV
 mI8QRZnOzImJ3s60bU2Ab9AAnvw/7S8bSvj7JxskAjN+yZOfru4isInLQ+Ase1WzC1nj
 4Jtsht13YG34GIctAo6/ur8W1wlKNFj1VqiWS/zff9wgUFRAoZrtdhlMdiNWCWXbXlL6
 II4UwH10quxDIiSsRivdSMUTcPFn/T7Ns916+fKDcHTH20kKhIERnVwiYGwX8050rsrK
 s38Q==
X-Forwarded-Encrypted: i=1;
 AJvYcCUukow/vVlR7E37iSMWOJDPrQFxG7kDxoeYGBKdQ+ZitzJfjqEHZksjq6E4pifKOTFa8rw4IcSEtAhxFDHDu7Kkn4mlCug=
X-Gm-Message-State: AOJu0YxJDbQF+jDpE78K23C4NubyfVfWP7rQG6/EDcSfhEcYk8BQirx2
 oTYJ4IoQFSP+yntIL9dY7rvCFtXIlLTsMnnBX79VgmNBicg9pfjT
X-Google-Smtp-Source: AGHT+IEsdS1sBmSJ1iOVLSIc7AU88mKAuTKrfFL54NBRVyXarjZC8cwzS4U9/doVQXq2V6xlGoSIMg==
X-Received: by 2002:a05:6e02:15c4:b0:373:8b80:eb41 with SMTP id
 e9e14a558f8ab-3748b96df35mr56063215ab.1.1717261671178; 
 Sat, 01 Jun 2024 10:07:51 -0700 (PDT)
Received: from smtpclient.apple ([2601:646:8f81:f810:8583:e600:bd04:ee0f])
 by smtp.gmail.com with ESMTPSA id
 41be03b00d2f7-6c354b943f6sm2945378a12.22.2024.06.01.10.07.49
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 01 Jun 2024 10:07:50 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\))
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <yp11q5ktw37.fsf@HIDDEN>
Date: Sat, 1 Jun 2024 10:07:38 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <CC10931C-9448-47E7-93EC-7D74AC85B49D@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN> <868r157wdy.fsf@HIDDEN>
 <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN> <868r0phq6e.fsf@HIDDEN>
 <493C3C1B-74F2-405D-830F-213B4D76DDC1@HIDDEN> <86wmnrecr0.fsf@HIDDEN>
 <61C9A0EB-D97D-4223-B257-FCA8DB150AA6@HIDDEN> <86ikz66m5l.fsf@HIDDEN>
 <yp11q5ktw37.fsf@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
X-Mailer: Apple Mail (2.3774.600.62)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 69952
Cc: Eli Zaretskii <eliz@HIDDEN>, Daniel Colascione <dancol@HIDDEN>,
 69952 <at> debbugs.gnu.org, serg.foo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On May 29, 2024, at 9:35=E2=80=AFAM, Andrea Corallo <acorallo@HIDDEN> =
wrote:
>=20
> Eli Zaretskii <eliz@HIDDEN> writes:
>=20
>>> From: Yuan Fu <casouri@HIDDEN>
>>> Date: Tue, 21 May 2024 23:36:47 -0700
>>> Cc: serg.foo@HIDDEN,
>>> dancol@HIDDEN,
>>> 69952 <at> debbugs.gnu.org
>>>=20
>>>>>>> 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.
>>>>>>=20
>>>>>> Can you suggest such an addition to the patch?
>>>>>=20
>>>>> Let me take a look.
>>>>>=20
>>>>> Yuan
>>>=20
>>> Am I missing something? It seems the patch doesn=E2=80=99t include =
anything about loading a dumped query?
>>=20
>> Looks like that, yes.
>>=20
>>> I guess that=E2=80=99s the addition you=E2=80=99re talking about? If =
I want to add a special loader, where should I start?
>>=20
>> I guess in dump_do_emacs_relocation and/or dump_do_dump_relocation?
>=20
> Yes that's correct.
>=20
>> Alternatively, perhaps it's better to define a hook via
>> pdumper_do_now_and_after_load_impl or
>> pdumper_do_now_and_after_late_load_impl, in which case the hook will
>> be run after loading the dump file.  This sounds easier if you can
>> access all the loaded queries one by one, instead of catching them
>> as they are being loaded.
>=20
> Note also that if one decides to execute code at LATE_RELOCS or
> VERY_LATE_RELOCS time he has the lisp machinery at disposal (including
> allocation), but native code becomes functional only after
> VERY_LATE_RELOCS relocs are done (not sure this can impact you here).
>=20
> On this might be necessary if Yuan goes for the hook and needs native
> Lisp code to be working, to add
> 'pdumper_do_now_and_after_very_late_load_impl' (which I think I didn't
> bothered at the time).
>=20
>  Andrea

Thanks to you both! I=E2=80=99ll see what I can come up with.

Yuan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 29 May 2024 16:35:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 29 12:35:49 2024
Received: from localhost ([127.0.0.1]:43634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sCMHA-00072W-8N
	for submit <at> debbugs.gnu.org; Wed, 29 May 2024 12:35:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51762)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acorallo@HIDDEN>) id 1sCMH5-000723-W1
 for 69952 <at> debbugs.gnu.org; Wed, 29 May 2024 12:35:42 -0400
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 <acorallo@HIDDEN>)
 id 1sCMGq-0008Mp-MG; Wed, 29 May 2024 12:35:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=ZL8yQoCvJ4vAuQhI5dqPY/R5v51ddDdGqmG9HWDfslU=; b=K6Dny9+mMOv2/XDJ7WYL
 0IGJ155FfeFFk9vsR8VtyU6VnPhiZmQWMSVhXe/20qAiKOn9jB24F2r60QATIKhdl51NPLmgWZFw3
 Mhr7N9jMOVF9BVCoeipEkjY6MLgNtBehrdVtaef5iEfsmXTWyaUpo2UBdpDxOADQlMPOxBoSA6sbl
 OoruJoIR0qwg2V8Exn1o3QZtkmnlgDHrPXGTCbKMiRVkW0zeBuIjOg2qUFu8lZwrbQELTeYDYX+bd
 gGCYTc9QuzzpyqklhtNs8GfK1ti+CdwUO3CuznZH5+3hKJW3a12pF9AXvoadhiY6PTzI9Nl2ZvmYf
 O4QPryZQCHZDDA==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1sCMGq-000646-Dh; Wed, 29 May 2024 12:35:24 -0400
From: Andrea Corallo <acorallo@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
In-Reply-To: <86ikz66m5l.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 22 May
 2024 15:55:50 +0300")
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN>
 <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN>
 <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN>
 <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN>
 <868r157wdy.fsf@HIDDEN>
 <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN>
 <868r0phq6e.fsf@HIDDEN>
 <493C3C1B-74F2-405D-830F-213B4D76DDC1@HIDDEN>
 <86wmnrecr0.fsf@HIDDEN>
 <61C9A0EB-D97D-4223-B257-FCA8DB150AA6@HIDDEN>
 <86ikz66m5l.fsf@HIDDEN>
Date: Wed, 29 May 2024 12:35:24 -0400
Message-ID: <yp11q5ktw37.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: Yuan Fu <casouri@HIDDEN>, dancol@HIDDEN, 69952 <at> debbugs.gnu.org,
 serg.foo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Yuan Fu <casouri@HIDDEN>
>> Date: Tue, 21 May 2024 23:36:47 -0700
>> Cc: serg.foo@HIDDEN,
>>  dancol@HIDDEN,
>>  69952 <at> debbugs.gnu.org
>>=20
>> >>>> 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.
>> >>>=20
>> >>> Can you suggest such an addition to the patch?
>> >>=20
>> >> Let me take a look.
>> >>=20
>> >> Yuan
>>=20
>> Am I missing something? It seems the patch doesn=E2=80=99t include anyth=
ing about loading a dumped query?
>
> Looks like that, yes.
>
>> I guess that=E2=80=99s the addition you=E2=80=99re talking about? If I w=
ant to add a special loader, where should I start?
>
> I guess in dump_do_emacs_relocation and/or dump_do_dump_relocation?

Yes that's correct.

> Alternatively, perhaps it's better to define a hook via
> pdumper_do_now_and_after_load_impl or
> pdumper_do_now_and_after_late_load_impl, in which case the hook will
> be run after loading the dump file.  This sounds easier if you can
> access all the loaded queries one by one, instead of catching them
> as they are being loaded.

Note also that if one decides to execute code at LATE_RELOCS or
VERY_LATE_RELOCS time he has the lisp machinery at disposal (including
allocation), but native code becomes functional only after
VERY_LATE_RELOCS relocs are done (not sure this can impact you here).

On this might be necessary if Yuan goes for the hook and needs native
Lisp code to be working, to add
'pdumper_do_now_and_after_very_late_load_impl' (which I think I didn't
bothered at the time).

  Andrea




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 22 May 2024 12:56:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 22 08:56:10 2024
Received: from localhost ([127.0.0.1]:55806 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s9lVp-0002Q1-PB
	for submit <at> debbugs.gnu.org; Wed, 22 May 2024 08:56:10 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35306)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s9lVn-0002Pv-3M
 for 69952 <at> debbugs.gnu.org; Wed, 22 May 2024 08:56:08 -0400
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 <eliz@HIDDEN>)
 id 1s9lVb-0002ER-U3; Wed, 22 May 2024 08:55:55 -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=43XU39Np+IENhWfFRQbyOVX0hqp/qqxn9cFg2MMdOKc=; b=LJK+DNy/Ew3+YBkpKLGY
 xQGMWn47wyGr/IUK4H7Pv7XhEjKofFPKNAn4OoX/ayd4EdsaSOWfkxR3X7hf1oQPibmCPwTDiA0vH
 2OIA3g27Cg1M62QKFiG7FEgJzziLoosOGyHhbl9x7PDmDDAWiF1PYYGYCsl8Ju1III+kZ4s2H7CC4
 tQAXz4Up60JoH/HhpFYRVcmvHyVAsmmZgwI3J/rVGypC0TT/1Hej+9gvwYJF+i4KzX3Qv1vRQcpwn
 S3ayPDXC9fTLwHUxohCTO7JzDAx/FygXEu4ZqF9pt4PxfZPEcohWko4LCzeQc+pxOhbnUlmvvKaoc
 cZMgu8iPODrNlg==;
Date: Wed, 22 May 2024 15:55:50 +0300
Message-Id: <86ikz66m5l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <61C9A0EB-D97D-4223-B257-FCA8DB150AA6@HIDDEN> (message from
 Yuan Fu on Tue, 21 May 2024 23:36:47 -0700)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN> <868r157wdy.fsf@HIDDEN>
 <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN> <868r0phq6e.fsf@HIDDEN>
 <493C3C1B-74F2-405D-830F-213B4D76DDC1@HIDDEN> <86wmnrecr0.fsf@HIDDEN>
 <61C9A0EB-D97D-4223-B257-FCA8DB150AA6@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Tue, 21 May 2024 23:36:47 -0700
> Cc: serg.foo@HIDDEN,
>  dancol@HIDDEN,
>  69952 <at> debbugs.gnu.org
> 
> >>>> 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
> 
> Am I missing something? It seems the patch doesn’t include anything about loading a dumped query?

Looks like that, yes.

> I guess that’s the addition you’re talking about? If I want to add a special loader, where should I start?

I guess in dump_do_emacs_relocation and/or dump_do_dump_relocation?

Alternatively, perhaps it's better to define a hook via
pdumper_do_now_and_after_load_impl or
pdumper_do_now_and_after_late_load_impl, in which case the hook will
be run after loading the dump file.  This sounds easier if you can
access all the loaded queries one by one, instead of catching them
as they are being loaded.

Andrea, can you help Yuan here?  You have dealt with some of this when
you added dumping and restoring of native-compiled CUs, so I guess you
know your way better in pdumper.c.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 22 May 2024 06:38:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 22 02:38:13 2024
Received: from localhost ([127.0.0.1]:53810 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s9fc5-0006ra-Bp
	for submit <at> debbugs.gnu.org; Wed, 22 May 2024 02:38:13 -0400
Received: from mail-oi1-f171.google.com ([209.85.167.171]:46453)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1s9fc2-0006rR-J9
 for 69952 <at> debbugs.gnu.org; Wed, 22 May 2024 02:38:11 -0400
Received: by mail-oi1-f171.google.com with SMTP id
 5614622812f47-3c99d0521cbso2814739b6e.1
 for <69952 <at> debbugs.gnu.org>; Tue, 21 May 2024 23:38:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1716359819; x=1716964619; 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=PVxVM3HJADEHx+5JDZmCFzNqiSczhOFGoj+x7xt7UR4=;
 b=OL3PkSIO2ST1on9NG3bTP9qV+HiHB9DBd3ij/PeO3TkqbGYIlFW36F1isgv/njuRP2
 RO5LbJSgNa5enz8EYrH72DLU/8QAubslMYg93+bthSTsy2dgKeWnV1QqVRPcQoUWeNaQ
 r9LYTFRt13sQ8dx/wSszdqnAFsemCfOVPWzA6KHa4yHrvqw8hsb4gMztL8fQZKTw1lek
 hPo1BZj0dbpqU5v3oQLvIRMYyrmB/uCLByDD0e9xK+sU4yeX2Bis+faXC5PEwgo9bXWi
 9kMHG4lI9X6pZH47yfdJMIqvvct16xQqm6B1PhwOkNcmkxXkGTAIQoaIc5A0ewxa0pxr
 hbhA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1716359819; x=1716964619;
 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=PVxVM3HJADEHx+5JDZmCFzNqiSczhOFGoj+x7xt7UR4=;
 b=GGnfNieqZUcu80XB+XZGflH6nLkVqJAJ560giputjKReaaG8bi5ODZ3y9+gWIsHBWq
 rZu5/rodrOx/Cj3qYUMxy3TZ5ZpxGW9JSIcsEFaYTbPQU7/AixiETLt2OFyplzMIwHI/
 JF9Qy+ZOpXXK4+FY7mE2eVChsGigAMfJjxeC3LKyjREOR+lQ4wArrbwn18dG4z1Tt+74
 IHtSJwZlWJYpMpY+LzEIq4x2OvpxH2DJr+s3ZMI4qqe+CvIheSDPHzTWW5tNlpKhQ+VK
 wKmR+cLbZQCcwp358PS06bUiD17HjYsmG+87Ue3KSVFcEFtoiIEXk/afPVJvY9ry+E3O
 i67A==
X-Forwarded-Encrypted: i=1;
 AJvYcCWuVbcvvGPA7BY6uvv7Z+CcHo2ntFzPwkdEze+IUXfYEOiGROuJha/K2WMPY6M/+y64hhEYT34DJ1jCwJiTTnBMsywoMHg=
X-Gm-Message-State: AOJu0YxURWZqc46t5HRQNF4z6Tz3WuglYl0geZm6yn0ljwu4EOoG4btO
 tO8zR4IbtOZ1Ipc0M9v1QyiIujkQz/D4Dfyrs3RAqFinLUHyUZygslAN7A==
X-Google-Smtp-Source: AGHT+IHH0NDlHVMxb+UJ7OmsWUnYcEO2r4qMELEEr093Qgja+CQ/gLjck/fYeJw1h2dlyCNB31i9ZA==
X-Received: by 2002:a05:6808:f04:b0:3c8:6420:a9fc with SMTP id
 5614622812f47-3cdb817993bmr1439090b6e.58.1716359819399; 
 Tue, 21 May 2024 23:36:59 -0700 (PDT)
Received: from smtpclient.apple ([2601:641:300:4910:d47e:183a:1bb4:b282])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-6f6c4576a5bsm2515034b3a.208.2024.05.21.23.36.58
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 21 May 2024 23:36:58 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <86wmnrecr0.fsf@HIDDEN>
Date: Tue, 21 May 2024 23:36:47 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <61C9A0EB-D97D-4223-B257-FCA8DB150AA6@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN> <868r157wdy.fsf@HIDDEN>
 <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN> <868r0phq6e.fsf@HIDDEN>
 <493C3C1B-74F2-405D-830F-213B4D76DDC1@HIDDEN> <86wmnrecr0.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6.1.1)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On May 18, 2024, at 1:38 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
> Ping!
>=20
>> From: Yuan Fu <casouri@HIDDEN>
>> Date: Sat, 4 May 2024 14:29:06 -0700
>> Cc: serg.foo@HIDDEN,
>> dancol@HIDDEN,
>> 69952 <at> debbugs.gnu.org
>>=20
>>=20
>>=20
>>> On May 4, 2024, at 2:39 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>>=20
>>>> From: Yuan Fu <casouri@HIDDEN>
>>>> Date: Sun, 21 Apr 2024 23:25:10 -0700
>>>> Cc: dancol@HIDDEN,
>>>> serg.foo@HIDDEN,
>>>> 69952 <at> debbugs.gnu.org
>>>>=20
>>>>> On Apr 21, 2024, at 11:18 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>>>>=20
>>>>>=20
>>>>> 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?
>>>>=20
>>>> 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.
>>>=20
>>> Can you suggest such an addition to the patch?
>>=20
>> Let me take a look.
>>=20
>> Yuan

Am I missing something? It seems the patch doesn=E2=80=99t include =
anything about loading a dumped query? I guess that=E2=80=99s the =
addition you=E2=80=99re talking about? If I want to add a special =
loader, where should I start?

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 18 May 2024 08:38:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 18 04:38:26 2024
Received: from localhost ([127.0.0.1]:60336 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s8FaD-0007c1-M5
	for submit <at> debbugs.gnu.org; Sat, 18 May 2024 04:38:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49088)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s8FaB-0007bf-Gz
 for 69952 <at> debbugs.gnu.org; Sat, 18 May 2024 04:38:23 -0400
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 <eliz@HIDDEN>)
 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==;
Date: Sat, 18 May 2024 11:38:11 +0300
Message-Id: <86wmnrecr0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <493C3C1B-74F2-405D-830F-213B4D76DDC1@HIDDEN> (message from
 Yuan Fu on Sat, 4 May 2024 14:29:06 -0700)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN> <868r157wdy.fsf@HIDDEN>
 <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN> <868r0phq6e.fsf@HIDDEN>
 <493C3C1B-74F2-405D-830F-213B4D76DDC1@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!

> From: Yuan Fu <casouri@HIDDEN>
> Date: Sat, 4 May 2024 14:29:06 -0700
> Cc: serg.foo@HIDDEN,
>  dancol@HIDDEN,
>  69952 <at> debbugs.gnu.org
> 
> 
> 
> > On May 4, 2024, at 2:39 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> > 
> >> From: Yuan Fu <casouri@HIDDEN>
> >> Date: Sun, 21 Apr 2024 23:25:10 -0700
> >> Cc: dancol@HIDDEN,
> >> serg.foo@HIDDEN,
> >> 69952 <at> debbugs.gnu.org
> >> 
> >>> On Apr 21, 2024, at 11:18 PM, Eli Zaretskii <eliz@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 4 May 2024 21:29:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 04 17:29:50 2024
Received: from localhost ([127.0.0.1]:55876 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s3Mx3-0003Pp-N4
	for submit <at> debbugs.gnu.org; Sat, 04 May 2024 17:29:50 -0400
Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:53290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1s3Mx0-0003Pj-RV
 for 69952 <at> debbugs.gnu.org; Sat, 04 May 2024 17:29:48 -0400
Received: by mail-oi1-x235.google.com with SMTP id
 5614622812f47-3c964040721so246828b6e.2
 for <69952 <at> debbugs.gnu.org>; Sat, 04 May 2024 14:29:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714858158; x=1715462958; 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=+9vuO4bQ46ljTBc3PZD+fajYQvUCNbXWlIufhNIV2Vc=;
 b=KuLdykjhmRavawNz/SarB++C3BhSUNauDJSjP7Z1td/JIvPnFuL5EjoDSzojCg+mx+
 4LWW4HOE6aOWKfBnujYZVEu8rh1wA2GLmpGBXdh7MtR2nIaBCrna4RypsyZseSaUiaQ6
 qE0U1dXQn2YGkHmim8FpPI6kfpeEQqrtc0zYWdFv2blNwWgRxVTWvZpg1Aewabp0fE2k
 X2W6+ZeANmGfh26UT4jlFG1Ka1v7lge67O/5UpHwfjMJC+WhHLsM8PeU31CDC+z9AePp
 XavRN3/zUkQxxdeQpe29nUSqTa6iUXMLlMV9uA3K8ezRh9cPWDJCh/CRrhDGeWYly78g
 0PvQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714858158; x=1715462958;
 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=+9vuO4bQ46ljTBc3PZD+fajYQvUCNbXWlIufhNIV2Vc=;
 b=dSfcQV3so2bZFJGB2GhUBBOLb0OBX/ScYGr06YpLRccr3ywYRv05htYIeSGshJUDOl
 HYDlf5llztt0vcDmAb7vBaUR/JyVdlhSnQrXurkxt5BsfZMd7TnTSd/1ZGowUwwkUVee
 QABI4/aA5efMAxEiRenXVqSnDwX6/CbBkgQenzKsIbJodhKNwXGw0e3UaZXc3Q3JioKf
 Pq+ZElKGSCglxd2MrHgoBF76X77N/UoONmTGlCwb/IZcrR+djDt6OlbLP6KFQ7I5j3mE
 BBWOS3qyAeqhjF91bhooPusZWfpIT4vtZ6w0wFeSLjPe/hR0yMENVHB8czi9eQQeoje3
 jjIQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCXzUphbJVJa6zmNOYEkFFcRQo3K2ABI5rR7vD7mxxEDbcxTtbkcKXxuKUieyWiKRVnyAU3mOHsfZi8MQJksLuuQKr5z3cc=
X-Gm-Message-State: AOJu0YwZRyIDdy1/jmtNZEReNj7paP2/MBYoReBrRpI7UZEk4+3CJ41T
 xQl2j6UpBBbJ2vLHEFDjmm3I8hnirL8HUEhXLBlVXD16rwFWoUOY
X-Google-Smtp-Source: AGHT+IHmIylvdfeSHNYNqn2Lzd9f3nGTVX8JbKJKG57Vfohyu4tzYG4HviKYh+Vqv4mCVlaJQSzKkw==
X-Received: by 2002:a05:6808:428d:b0:3c9:68ef:88 with SMTP id
 dq13-20020a056808428d00b003c968ef0088mr312930oib.55.1714858157949; 
 Sat, 04 May 2024 14:29:17 -0700 (PDT)
Received: from smtpclient.apple ([2601:641:300:4910:1856:1180:222a:3188])
 by smtp.gmail.com with ESMTPSA id
 j190-20020a6380c7000000b0061b9d60740bsm4145660pgd.93.2024.05.04.14.29.16
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 04 May 2024 14:29:17 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <868r0phq6e.fsf@HIDDEN>
Date: Sat, 4 May 2024 14:29:06 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <493C3C1B-74F2-405D-830F-213B4D76DDC1@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN> <868r157wdy.fsf@HIDDEN>
 <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN> <868r0phq6e.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6.1.1)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On May 4, 2024, at 2:39 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> From: Yuan Fu <casouri@HIDDEN>
>> Date: Sun, 21 Apr 2024 23:25:10 -0700
>> Cc: dancol@HIDDEN,
>> serg.foo@HIDDEN,
>> 69952 <at> debbugs.gnu.org
>>=20
>>> On Apr 21, 2024, at 11:18 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>>=20
>>>=20
>>> 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?
>>=20
>> 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.
>=20
> Can you suggest such an addition to the patch?

Let me take a look.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 4 May 2024 09:39:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 04 05:39:42 2024
Received: from localhost ([127.0.0.1]:52393 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s3Brq-00006X-7a
	for submit <at> debbugs.gnu.org; Sat, 04 May 2024 05:39:42 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39472)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s3Brn-00006N-Ht
 for 69952 <at> debbugs.gnu.org; Sat, 04 May 2024 05:39:40 -0400
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 <eliz@HIDDEN>)
 id 1s3BrL-0002DR-2Z; Sat, 04 May 2024 05:39:11 -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=KPLm3d9KjoUrUwrdlC/26gq7Tvs0N7Pdli4WbNcvP2k=; b=GgNLZzvy4SlY
 6DIzoQbE75P2M/P8Akh8h8LW+lKv1fOQVvihAnroe5n/oddROrU9hFWk2/uFPKRaY4rYm/ZmZj2Wa
 OEtX2+UdG/ePflnXJIWULiqJUIH2vfU9gMkIZ9M+Tf2faLMfNgZTxWaRtQz5f/bdLQuBQrTOT6FY2
 lDKTss39ehWb/h134Ch3rTgS/huv8z5J+gh+rxcMYqpHpTh6Iv2tpCxM31OqEl16jRNcAaPHkvwKK
 eUI9CPamVY1iu8wE8Pw+ORyYfUUmC4BghSxbthDktqXvzYlP7sSRRtbJtNKe/PW+zgcaCmJzLDjCz
 ZWrsdb86AgEtPFcHiJWpBQ==;
Date: Sat, 04 May 2024 12:39:05 +0300
Message-Id: <868r0phq6e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>, serg.foo@HIDDEN
In-Reply-To: <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN> (message from
 Yuan Fu on Sun, 21 Apr 2024 23:25:10 -0700)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN> <868r157wdy.fsf@HIDDEN>
 <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: 69952 <at> debbugs.gnu.org, dancol@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Sun, 21 Apr 2024 23:25:10 -0700
> Cc: dancol@HIDDEN,
>  serg.foo@HIDDEN,
>  69952 <at> debbugs.gnu.org
> 
> > On Apr 21, 2024, at 11:18 PM, Eli Zaretskii <eliz@HIDDEN> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 22 Apr 2024 06:25:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 22 02:25:48 2024
Received: from localhost ([127.0.0.1]:45528 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ryn7b-0002dN-9x
	for submit <at> debbugs.gnu.org; Mon, 22 Apr 2024 02:25:48 -0400
Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:54436)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1ryn7Y-0002ck-1M
 for 69952 <at> debbugs.gnu.org; Mon, 22 Apr 2024 02:25:45 -0400
Received: by mail-pg1-x533.google.com with SMTP id
 41be03b00d2f7-5ca29c131ebso2683248a12.0
 for <69952 <at> debbugs.gnu.org>; Sun, 21 Apr 2024 23:25:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713767122; x=1714371922; 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=Edxe9rTruBKL0elmB9j2RgtgrFcz6pUzx/tJFYTK7iw=;
 b=Bzv2RY3XPI6WU/izRuR+ZmOSGzaXaO6WYcRpqlxZCS0/ZHicweW/LKiZcKGV10+ro/
 VRcedg9NxDH9nVCAVYbCEtDRY56+iqSp1EJbD+M1KPFMiocjVCGTJvCC3H/ZdCVa1PW2
 lvo+V6tjAwLIjO/oK7CrxDJjGxfgORGockqpfFWbZyhDB8nr481/yuajuWg/K2aWnABf
 CnIFTwM3MqgnDIWZhFXhzzZh4r81uRjHtv12IKMv9avw+MLqvq+XyRNaNy3QbHZTW6nr
 zKACmnTp9gsdXGlhy1tszwjWjUc2WmE3J1xv83tt9vWEx7dlELGFN3cjAnqaltquFoX4
 sXIg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713767122; x=1714371922;
 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=Edxe9rTruBKL0elmB9j2RgtgrFcz6pUzx/tJFYTK7iw=;
 b=MXqCTUczP3p0IF6mdDGfqttNAIUO9tIxnT3qi255Yv4FwO5r3h4xT1lAv5mJtrf/YN
 fxuBqBeltczRQ8bt1TpK1av41ZLtMWqYyfEMEc3iHuFpIMk4y7mJspBtf9ZGHK4swCus
 dEy68j4O4CODhRAnCk9hvlB8Vl5DehJJI359apI73QeV4AwUITKdlTEASng1MDusdhMW
 9rlG51Gk2jmWywCazOe2me8JlDY+F3780hVjQnsPSG9YIy8YvI5v0R4/kW8k6y0V/aIx
 JGRPP9JeiAPXoex39rB3lN/S0x+HOVCUTqnhm69IyGTRTtFEkykaWcKOWwG9eEA/lp8r
 sqRg==
X-Forwarded-Encrypted: i=1;
 AJvYcCV1dIHvpX+pmKMHRCYWGH9VZNrp/WPe5stPfZU08eBlK06J27p77WEduc3+fuxFoeIOwQg7zx+UeYPYj+3Wy34+Q+y84EI=
X-Gm-Message-State: AOJu0YwjtMRX27opbTnQayMkZ4gsiANjXUCKSHMQ5xA9AuC1H/gkhSws
 KVt0uCP9BDBCPziVebKHYMsTtVJjVVb8ggsLMqf52YxRKxNvWFDB
X-Google-Smtp-Source: AGHT+IGZ9joq9nsctTbm9PnPTFbngbMbOzGMSOVhOuYWRAutkdSeRpZLsDxiHmAo3MsL+mROUZ43Xw==
X-Received: by 2002:a05:6a21:150a:b0:1ad:12da:e5d2 with SMTP id
 nq10-20020a056a21150a00b001ad12dae5d2mr4806606pzb.55.1713767122261; 
 Sun, 21 Apr 2024 23:25:22 -0700 (PDT)
Received: from smtpclient.apple ([2601:641:300:4910:e4f6:f0b8:c91d:e40b])
 by smtp.gmail.com with ESMTPSA id
 g14-20020a62f94e000000b006f2d97c3e87sm1108670pfm.125.2024.04.21.23.25.21
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 21 Apr 2024 23:25:21 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <868r157wdy.fsf@HIDDEN>
Date: Sun, 21 Apr 2024 23:25:10 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <A8EA5E2A-9C8E-41A9-8AEC-59DE57220F7C@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN> <868r157wdy.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6.1.1)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Apr 21, 2024, at 11:18 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> From: Yuan Fu <casouri@HIDDEN>
>> Date: Sun, 21 Apr 2024 23:04:47 -0700
>> Cc: Daniel Colascione <dancol@HIDDEN>,
>> serg.foo@HIDDEN,
>> 69952 <at> debbugs.gnu.org
>>=20
>>>> No. You need both tree-sitter library and the grammar library.
>>>=20
>>> That's what I thought.  So starting Emacs in that case will attempt =
to
>>> call a function from the tree-sitter library, and will segfault,
>>> right?  If so, we should have some protection in the code in
>>> pdumper.c that loads queries, which tests that tree-sitter is
>>> availabale, and if not does something to prevent the segfault, like
>>> not loading the query, perhaps?
>>=20
>> Right, it can use Ftreesit_available_p (we can define a C equivalent =
if pdumper can=E2=80=99t call lisp), and decide whether to compile the =
query or just keep the query as a string, or signal an error?
>=20
> 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.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 22 Apr 2024 06:19:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 22 02:19:29 2024
Received: from localhost ([127.0.0.1]:45524 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ryn1U-0001zx-Gg
	for submit <at> debbugs.gnu.org; Mon, 22 Apr 2024 02:19:29 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40996)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ryn1R-0001yj-Es
 for 69952 <at> debbugs.gnu.org; Mon, 22 Apr 2024 02:19:27 -0400
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 <eliz@HIDDEN>)
 id 1ryn0z-0001nW-Vv; Mon, 22 Apr 2024 02:19:03 -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=jkSmQjbEaoq33FNH2toVZC53STmSrtq4/eTlWaNt+Bo=; b=XQYNRFL+vpaw9SAtLhcP
 NIaolpng8zk85gpXYbe64gfPuVAbtoPNqgfIgU8127L36NVioy5yyR1iygvNRIsDnU9CXf1WXe6NR
 aFmsIzWUO+ke60iXojzpte3poRdBnreoyUpKqcZ62kYPnZqfnTrMRwyA9EQfoFCVDA1dPAjVYyQaY
 6J6ULpiNCzhzZlRPEEKhs1OOVLNtcg8zg7cCy1txeSQL4WZDX3izM0NFUsjT/yL/VdewCg4y4D7g1
 6WuehDJw0Sox6QQJGki3iPFFvp+eZf8MRxELyyC5vfhgTFW7fkPIDGeesC+i38TLenPDHHrhJSiCw
 pVDKBlRaUY8MXQ==;
Date: Mon, 22 Apr 2024 09:18:49 +0300
Message-Id: <868r157wdy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN> (message from
 Yuan Fu on Sun, 21 Apr 2024 23:04:47 -0700)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
 <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Sun, 21 Apr 2024 23:04:47 -0700
> Cc: Daniel Colascione <dancol@HIDDEN>,
>  serg.foo@HIDDEN,
>  69952 <at> debbugs.gnu.org
> 
> >> No. You need both tree-sitter library and the grammar library.
> > 
> > That's what I thought.  So starting Emacs in that case will attempt to
> > call a function from the tree-sitter library, and will segfault,
> > right?  If so, we should have some protection in the code in
> > pdumper.c that loads queries, which tests that tree-sitter is
> > availabale, and if not does something to prevent the segfault, like
> > not loading the query, perhaps?
> 
> Right, it can use Ftreesit_available_p (we can define a C equivalent if pdumper can’t call lisp), and decide whether to compile the query or just keep the query as a string, or signal an error?

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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 22 Apr 2024 06:05:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 22 02:05:29 2024
Received: from localhost ([127.0.0.1]:45514 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rymnv-0000VA-1R
	for submit <at> debbugs.gnu.org; Mon, 22 Apr 2024 02:05:29 -0400
Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:50227)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1rymno-0000Th-OI
 for 69952 <at> debbugs.gnu.org; Mon, 22 Apr 2024 02:05:24 -0400
Received: by mail-pf1-x432.google.com with SMTP id
 d2e1a72fcca58-6ed0e9ccca1so3662111b3a.0
 for <69952 <at> debbugs.gnu.org>; Sun, 21 Apr 2024 23:05:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713765899; x=1714370699; 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=aRbz+3agxj8OkOH1gUOAljYf+9UaAaPJuViLbzkjkzM=;
 b=nfOvXfGoWMXXRzCeKWiti31a4P+ZXVcCSRL0J1AZXS58trgxpQixfh5afQ2rQVu7r/
 k/4yhg8d4PPwUbYPLh/w78TMl+vTd7FZN34WoAgNBuQOmXk1O043QOQE+Aw6w6f/nnJl
 4F1i1EJLlHyWwpYf/UBYhf2RYXB7+5Mj6+5BJ+logAfZfPvVvI8zTVGaB0bmdFHVY2T5
 3+MODLJsKkmr74xbwEuL56Qngl8r3EgPo6fdcUCuOCC6rmSN9ohnEHEhV+GRiUGjd3ok
 ONWsMeU/QUHRDWJCbxQ62OIyvg+PvU8vAQM3ZmRBQZXMr1HPIqEtSbdGQEjUNZgc8dPJ
 sKKQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713765899; x=1714370699;
 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=aRbz+3agxj8OkOH1gUOAljYf+9UaAaPJuViLbzkjkzM=;
 b=BUf83xuqLMVNruWvBpunF/4w77tanJA0WFhmUVaUICF84NdJGjwZPZW1krZJFI8499
 +byMFyiwkji8MacJFakDOTjQZgE199+yaICWyp7LWbz04HRcSmoLDUveXbRBtBbdXbqJ
 eP+dtkoB8wFuXE20dXxP9xii5xdj2Qurb4/C+kcZhy3VxSSBin/05n638kgBlfG/+jNX
 GDiPfJzF3clpJbPZLJkbLMTMOeqvKIhxa492CLc9rnrxndZmhHDRMFB9LpTyNIJTGypK
 QR4DgfSKfWpIJDnyO3iIfgwVVvxLER8dw0bFiwUtO2uHNYkt+gldXClqWVNFX2enE2FX
 Sp/A==
X-Forwarded-Encrypted: i=1;
 AJvYcCW5ockwDj+vI7bycE5B0kJh2gsYYQN9T8QXhN51JeWdAL82aypouOs423OcyqJb3gmF9q3RnRqJdUB75Oe31QqLSnOIMvM=
X-Gm-Message-State: AOJu0Yx4puqEp4a83LnX9ngUiV2ojK2D0BH4MpaEn32pZPUvdBHyB01j
 AXjlcaMgKWozPTaF5nD1Q2y9iBpF1AJD7q6+Re8J7fC4G2jjmioV
X-Google-Smtp-Source: AGHT+IFHoCRsYjZTdVKQOvmMrBoZHD7+jdX7fGARWokG9ZQrxy6fuY69MOfRPKSoHlnwABKR1cLxaA==
X-Received: by 2002:a05:6a00:2295:b0:6ec:fd67:a27e with SMTP id
 f21-20020a056a00229500b006ecfd67a27emr11205410pfe.1.1713765898991; 
 Sun, 21 Apr 2024 23:04:58 -0700 (PDT)
Received: from smtpclient.apple ([2601:641:300:4910:e4f6:f0b8:c91d:e40b])
 by smtp.gmail.com with ESMTPSA id
 j4-20020a62b604000000b006ece5ad143esm7040505pff.127.2024.04.21.23.04.58
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 21 Apr 2024 23:04:58 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <86eday6j9o.fsf@HIDDEN>
Date: Sun, 21 Apr 2024 23:04:47 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <B73B2D3D-98BA-43E2-B8D1-99C9678F1D1A@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> <86eday6j9o.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6.1.1)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, Daniel Colascione <dancol@HIDDEN>,
 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Apr 21, 2024, at 10:47 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> From: Yuan Fu <casouri@HIDDEN>
>> Date: Sun, 21 Apr 2024 16:41:54 -0700
>> Cc: Daniel Colascione <dancol@HIDDEN>,
>> serg.foo@HIDDEN,
>> 69952 <at> debbugs.gnu.org
>>=20
>>=20
>>=20
>>> On Apr 20, 2024, at 9:53 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>>=20
>>>> From: Yuan Fu <casouri@HIDDEN>
>>>> Date: Sat, 20 Apr 2024 15:50:36 -0700
>>>> Cc: Daniel Colascione <dancol@HIDDEN>,
>>>> serg.foo@HIDDEN,
>>>> 69952 <at> debbugs.gnu.org
>>>>=20
>>>>>>> On Apr 13, 2024, at 12:41 AM, Eli Zaretskii <eliz@HIDDEN> =
wrote:
>>>>>>>>=20
>>>>>>>> And I have a question: what happens if the pdumper file dumped =
with
>>>>>>>> tree-sitter available is loaded by an Emacs session in which
>>>>>>>> tree-sitter is not available?  That can happen on Windows, for
>>>>>>>> example, if the tree-sitter library or the grammar library =
required
>>>>>>>> for recomputing the query is not available.  I think we need =
some code
>>>>>>>> to prevent Emacs from crashing on startup in that case.
>>>>>>=20
>>>>>> Yeah, being able to dump queries is certainly nice. There will be =
problems if the Emacs session that later loads the query either have a =
different grammar version loaded, or a difference grammar library for =
the same language, or outright doesn=E2=80=99t have tree-sitter like Eli =
mentioned. I don=E2=80=99t know if they are big enough problems to give =
up dumping queries, though.
>>>>>=20
>>>>> Giving up: no.  But I think the code which loads the queries from =
the
>>>>> pdumper file should be protected from crashing in those cases.  =
Can
>>>>> you suggest how to do that?
>>>>=20
>>>> Would Emacs crash? If the dump file just contains the query (which =
is a string), then Emacs would just compile the query with =
treesit-query-compile, it could fail (due to the reasons I mentioned), =
but shouldn=E2=80=99t crash Emacs.
>>>=20
>>> Can Emacs compile a query if the tree-sitter shared library and/or =
the
>>> grammar library is not available?
>>=20
>> No. You need both tree-sitter library and the grammar library.
>=20
> That's what I thought.  So starting Emacs in that case will attempt to
> call a function from the tree-sitter library, and will segfault,
> right?  If so, we should have some protection in the code in
> pdumper.c that loads queries, which tests that tree-sitter is
> availabale, and if not does something to prevent the segfault, like
> not loading the query, perhaps?

Right, it can use Ftreesit_available_p (we can define a C equivalent if =
pdumper can=E2=80=99t call lisp), and decide whether to compile the =
query or just keep the query as a string, or signal an error?

Yuan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 22 Apr 2024 05:47:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 22 01:47:59 2024
Received: from localhost ([127.0.0.1]:45493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rymX1-0006iy-0c
	for submit <at> debbugs.gnu.org; Mon, 22 Apr 2024 01:47:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42688)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rymWx-0006hr-TV
 for 69952 <at> debbugs.gnu.org; Mon, 22 Apr 2024 01:47:57 -0400
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 <eliz@HIDDEN>)
 id 1rymWc-00053s-Cd; Mon, 22 Apr 2024 01:47:34 -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=vRCldk7JmkNeqLSY8aEnJj1t0yeXs6mnYazhtWUOwLg=; b=F27m08jwwuLg33fBC6G2
 tgM7QTD1fcMZ45MdQvhWtnpNP1wvLZu/j7nfR6kMBNsGVOwjlPaeuhbrEYnsDL5gb3Q9yD6wdZPS2
 Mxl8rm6zU+Bu5oI6IHIahvY3kSuIYSq/OVfhEpe729Pr647oxuRSahLZmFEf2sYDoGy2dGb7+GTQI
 pD5dVecHjZVcEYE4bbPJbqAgpg/oLyHURxZYEROcqQVIhbdMoRSqQkWgDKg7mJXHn77/cFv/RPPu+
 X2lNvvgtz3lYmyNAJlFn+o1c7SyydPHcrqOggVji0rVO608hFzOBRa0n4WYvmryPHVqFn/R6wR2kJ
 APuf8mPle9euxw==;
Date: Mon, 22 Apr 2024 08:47:31 +0300
Message-Id: <86eday6j9o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN> (message from
 Yuan Fu on Sun, 21 Apr 2024 16:41:54 -0700)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
 <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Sun, 21 Apr 2024 16:41:54 -0700
> Cc: Daniel Colascione <dancol@HIDDEN>,
>  serg.foo@HIDDEN,
>  69952 <at> debbugs.gnu.org
> 
> 
> 
> > On Apr 20, 2024, at 9:53 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
> > 
> >> From: Yuan Fu <casouri@HIDDEN>
> >> Date: Sat, 20 Apr 2024 15:50:36 -0700
> >> Cc: Daniel Colascione <dancol@HIDDEN>,
> >> serg.foo@HIDDEN,
> >> 69952 <at> debbugs.gnu.org
> >> 
> >>>>> On Apr 13, 2024, at 12:41 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> >>>>>> 
> >>>>>> And I have a question: what happens if the pdumper file dumped with
> >>>>>> tree-sitter available is loaded by an Emacs session in which
> >>>>>> tree-sitter is not available?  That can happen on Windows, for
> >>>>>> example, if the tree-sitter library or the grammar library required
> >>>>>> for recomputing the query is not available.  I think we need some code
> >>>>>> to prevent Emacs from crashing on startup in that case.
> >>>> 
> >>>> Yeah, being able to dump queries is certainly nice. There will be problems if the Emacs session that later loads the query either have a different grammar version loaded, or a difference grammar library for the same language, or outright doesn’t have tree-sitter like Eli mentioned. I don’t know if they are big enough problems to give up dumping queries, though.
> >>> 
> >>> Giving up: no.  But I think the code which loads the queries from the
> >>> pdumper file should be protected from crashing in those cases.  Can
> >>> you suggest how to do that?
> >> 
> >> Would Emacs crash? If the dump file just contains the query (which is a string), then Emacs would just compile the query with treesit-query-compile, it could fail (due to the reasons I mentioned), but shouldn’t crash Emacs.
> > 
> > Can Emacs compile a query if the tree-sitter shared library and/or the
> > grammar library is not available?
> 
> No. You need both tree-sitter library and the grammar library.

That's what I thought.  So starting Emacs in that case will attempt to
call a function from the tree-sitter library, and will segfault,
right?  If so, we should have some protection in the code in
pdumper.c that loads queries, which tests that tree-sitter is
availabale, and if not does something to prevent the segfault, like
not loading the query, perhaps?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 21 Apr 2024 23:42:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 21 19:42:31 2024
Received: from localhost ([127.0.0.1]:45254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rygpK-0004VR-VM
	for submit <at> debbugs.gnu.org; Sun, 21 Apr 2024 19:42:31 -0400
Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:51634)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1rygpH-0004US-AG
 for 69952 <at> debbugs.gnu.org; Sun, 21 Apr 2024 19:42:28 -0400
Received: by mail-pg1-x532.google.com with SMTP id
 41be03b00d2f7-5c6bd3100fcso2147952a12.3
 for <69952 <at> debbugs.gnu.org>; Sun, 21 Apr 2024 16:42:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713742926; x=1714347726; 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=56bauEgHtc7Y1tSj31V8PE0zEYhajndXPKhpNJYO1Y4=;
 b=Sucvfww6wA0ubQ4rbg0N2P6Ivx2caLQM02eYklbkK8J8Y0ieebx/WEUevktpHePajC
 0H7R9/z5lcZNNCQwodn7ycBc6S0Q4iJyD3Mlpz2qlQDWOTYefpM3/9Ak8HxjlcgzdzMq
 RlmEghots+Ci5GrzgRaq4vlAHfJ8rRL1zTivoYN1d9BsNEGiJBTePyIWEIcKT9i0lvHo
 rDgAwqlLJwc/KfGmbGhO2EXA64znRmn8VNUhFGJe9xXz5rBavYNhqGuaYZdAkdsjyRd2
 6vCRc42ZUqSiO7noBJ7+m3mgURz2hfshbGq8gXXOD+z/2ZA3D1HVKjvdgQE6aGSj49HW
 Yi1w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713742926; x=1714347726;
 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=56bauEgHtc7Y1tSj31V8PE0zEYhajndXPKhpNJYO1Y4=;
 b=AKSetEefxlvMG67+NyH1TcnLfNoOPdmra7HSVRPwtx29e16QnAMyPkcQ6nUHI0eLy5
 virKN61YN7FJq0q5k7g2j97p8WXlXL3OSFGlUYbDDJ1LMx2kHdFmKjBU+mDoYRRrT/vS
 hVDx2VSc5XzFkUgBJ+4cxLxhcCgIZHkKitwWA3Soma45e+Op7BvCOGIz0WG5GNr5Dk5/
 BYis57Rn1FKRGsfN3x5iCwsgfofdlWU8eh0WSE1q8uha0tGvDVWnUR5XQnunYhTmTnQv
 SQfrj2CgdaejWx2JACPVoHCP27Quf4MT9O0/3a7uDrE4nES1MsuvSgi8WN54r/t4XhXu
 4n4g==
X-Forwarded-Encrypted: i=1;
 AJvYcCV+61VOVA2LkEdkktw+wDTPyuOjNdMIzHmfBOVUjgYpw609CHLY5+0F3mfKUKrI1oHxV3LZMjxJQqbLwZ0GHZUNiE3mgDg=
X-Gm-Message-State: AOJu0YyKRbnx/slWNlPPaz6B2cev68ISH1+xbpvWmP5QpjWt/8ZQW6Ju
 TxZxKFfX5adv718kp7hHg5yIR8GoapwtAz3MHHd8LDd3XmqbTGDw
X-Google-Smtp-Source: AGHT+IHCrJQrjp5M+1ysXYw3aZnbyEPqhgaN8CBOt8SR/5m7IjcXE6wd9VrthrNi18bkWgV7vtMgbg==
X-Received: by 2002:a17:903:191:b0:1e4:4125:806f with SMTP id
 z17-20020a170903019100b001e44125806fmr10043018plg.11.1713742925801; 
 Sun, 21 Apr 2024 16:42:05 -0700 (PDT)
Received: from smtpclient.apple ([2601:641:300:4910:e4f6:f0b8:c91d:e40b])
 by smtp.gmail.com with ESMTPSA id
 t20-20020a170902b21400b001e3e081dea1sm6830979plr.0.2024.04.21.16.42.04
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 21 Apr 2024 16:42:05 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <86frvf8gf9.fsf@HIDDEN>
Date: Sun, 21 Apr 2024 16:41:54 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <B00CF6F5-8A3B-4EE4-BC89-9890BADB8F62@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> <86frvf8gf9.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6.1.1)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, Daniel Colascione <dancol@HIDDEN>,
 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Apr 20, 2024, at 9:53 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> From: Yuan Fu <casouri@HIDDEN>
>> Date: Sat, 20 Apr 2024 15:50:36 -0700
>> Cc: Daniel Colascione <dancol@HIDDEN>,
>> serg.foo@HIDDEN,
>> 69952 <at> debbugs.gnu.org
>>=20
>>>>> On Apr 13, 2024, at 12:41 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>>>>>=20
>>>>>> And I have a question: what happens if the pdumper file dumped =
with
>>>>>> tree-sitter available is loaded by an Emacs session in which
>>>>>> tree-sitter is not available?  That can happen on Windows, for
>>>>>> example, if the tree-sitter library or the grammar library =
required
>>>>>> for recomputing the query is not available.  I think we need some =
code
>>>>>> to prevent Emacs from crashing on startup in that case.
>>>>=20
>>>> Yeah, being able to dump queries is certainly nice. There will be =
problems if the Emacs session that later loads the query either have a =
different grammar version loaded, or a difference grammar library for =
the same language, or outright doesn=E2=80=99t have tree-sitter like Eli =
mentioned. I don=E2=80=99t know if they are big enough problems to give =
up dumping queries, though.
>>>=20
>>> Giving up: no.  But I think the code which loads the queries from =
the
>>> pdumper file should be protected from crashing in those cases.  Can
>>> you suggest how to do that?
>>=20
>> Would Emacs crash? If the dump file just contains the query (which is =
a string), then Emacs would just compile the query with =
treesit-query-compile, it could fail (due to the reasons I mentioned), =
but shouldn=E2=80=99t crash Emacs.
>=20
> Can Emacs compile a query if the tree-sitter shared library and/or the
> grammar library is not available?

No. You need both tree-sitter library and the grammar library.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 21 Apr 2024 04:54:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 21 00:54:13 2024
Received: from localhost ([127.0.0.1]:40562 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ryPDQ-0002KM-Kv
	for submit <at> debbugs.gnu.org; Sun, 21 Apr 2024 00:54:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59482)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ryPDO-0002Je-Nn
 for 69952 <at> debbugs.gnu.org; Sun, 21 Apr 2024 00:54:11 -0400
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 <eliz@HIDDEN>)
 id 1ryPD2-0003XA-Rw; Sun, 21 Apr 2024 00:53:49 -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=KGMIuoAF1wknQqzu6+w1zhx+LNRIzYwuwX+5u8v52U0=; b=O7z5z0fGGhmcmJHdGx9d
 VoST5qFAWhWyu3UPcEivdrrzQIBHhBO4Ae3LvoJ6ETC17MgAVH//gVgyTntZWN4WVBUowSLNACGHo
 XUbFPDk83Dyab6pz27gUDfsZUjLnfOlIJj6IhWFuQ8OaVND4nBQcUQkljRgN02OeaFp36F7XhbnIH
 FkBaZ5xolhkg6NjTtNrVveiFGiWxx9dhP3nKPjBNMVuVCPubjV4h6s0J/GPxwXQBkzsgrOtB/vWiT
 Cs2C6wOcVztA2nRi0TT6TcNPTdtDTG4yHDuC/q5L24y19TK9kTWK30/j+No83NZjfMQjW/AsChTTV
 4TKzYBcirk9H7w==;
Date: Sun, 21 Apr 2024 07:53:46 +0300
Message-Id: <86frvf8gf9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN> (message from
 Yuan Fu on Sat, 20 Apr 2024 15:50:36 -0700)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
 <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Sat, 20 Apr 2024 15:50:36 -0700
> Cc: Daniel Colascione <dancol@HIDDEN>,
>  serg.foo@HIDDEN,
>  69952 <at> debbugs.gnu.org
> 
> >>> On Apr 13, 2024, at 12:41 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> >>>> 
> >>>> And I have a question: what happens if the pdumper file dumped with
> >>>> tree-sitter available is loaded by an Emacs session in which
> >>>> tree-sitter is not available?  That can happen on Windows, for
> >>>> example, if the tree-sitter library or the grammar library required
> >>>> for recomputing the query is not available.  I think we need some code
> >>>> to prevent Emacs from crashing on startup in that case.
> >> 
> >> Yeah, being able to dump queries is certainly nice. There will be problems if the Emacs session that later loads the query either have a different grammar version loaded, or a difference grammar library for the same language, or outright doesn’t have tree-sitter like Eli mentioned. I don’t know if they are big enough problems to give up dumping queries, though.
> > 
> > Giving up: no.  But I think the code which loads the queries from the
> > pdumper file should be protected from crashing in those cases.  Can
> > you suggest how to do that?
> 
> Would Emacs crash? If the dump file just contains the query (which is a string), then Emacs would just compile the query with treesit-query-compile, it could fail (due to the reasons I mentioned), but shouldn’t crash Emacs.

Can Emacs compile a query if the tree-sitter shared library and/or the
grammar library is not available?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 20 Apr 2024 22:51:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 20 18:51:13 2024
Received: from localhost ([127.0.0.1]:38645 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ryJY8-0004WK-1w
	for submit <at> debbugs.gnu.org; Sat, 20 Apr 2024 18:51:13 -0400
Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:51466)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1ryJY5-0004V6-Fz
 for 69952 <at> debbugs.gnu.org; Sat, 20 Apr 2024 18:51:10 -0400
Received: by mail-pj1-x1029.google.com with SMTP id
 98e67ed59e1d1-2a2da57ab3aso2457063a91.3
 for <69952 <at> debbugs.gnu.org>; Sat, 20 Apr 2024 15:50:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713653448; x=1714258248; 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=3iRWKa5DC1NFA9wFskYQ4V4YvgyApv/RpssRVpwt0kE=;
 b=Nj7aYj7hbYGXkKSbXd6wwGHfPo8i3UzuPBizH5mZSznptoMLbmh3Bm6TCcrwq12kF+
 r4pIlqPa4PoCdMKLHcRBsG69sT4pvj1gHRrT0J1cjrmcevXagPiNW7T5FlgHZb8gby4C
 SoL9h0aYSfxTryJUpSevOo9IzFRJYEaBTvhmcii80Q/nZGKbeH7NlD1MMsq9vAI7YbuO
 MgKI5playlWQlLlXEaX6XkzuxaYoVutxmQAuXCyLGgjss+w6/ixVoG19O3R1m+R4SnyF
 p/fu+c4FlDhpIfDjLD9lxISeWTVj643deytxz/HL3LvmyYwSqc8IyMgqq2Fvj5glhhrg
 fG5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713653448; x=1714258248;
 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=3iRWKa5DC1NFA9wFskYQ4V4YvgyApv/RpssRVpwt0kE=;
 b=Mqx6GBobKNCsMUFNybsFFpUU7Lw6yKOElF2kzSG5LwYVPa0kfndV641IgEfL4kgon7
 xlXsJewsmzGZvi1pE2OvAhinIcAffjw4e12Zzc0fjVOneeAZETa0FWC0cuqKEjPDaCbo
 W1nh6xnXqTXGXJmQDw5bJLl2q7JCOzMittXvchm0mL5CeyV2L0ao4WPcvCxQWJDdGzs5
 JuEQsNWaAmdB9yldNb3e8BB2eEApj6+ksodBbF2+M2y47ic0KZ/mBzasOzwTi9byzMzd
 6Tz0jmK+qhVmndzSj7gnPjvmfOJFebYjefNGRPgeoz78qvWAW1cKn++Ip2geeY9qgZ/f
 l6Lw==
X-Forwarded-Encrypted: i=1;
 AJvYcCWDuEcKbjRp7TfN6s/XLLYKike1hIeId3zPuvcc9NK1p5504V5zYtDdOmpS69kg2eG0/4xKH/xQ82bFHPD8G6RnwHbJMys=
X-Gm-Message-State: AOJu0YyoAjtrBlG3AK2yNw6pdFgGK9e6w/mIhxV5P4vFOo/jdeAJO7NL
 220i4ZvVsOdpcGwRpY8fKkwrc3eENdx6F1ayuo1sK934DlH2PXey
X-Google-Smtp-Source: AGHT+IFlHutb2KUQAVAqEuZT3GM6YvkVxeO52zsvdsQFDCq5y7DdTAK02gOuGNsuj3iyEFXj/BAxoA==
X-Received: by 2002:a17:90b:90f:b0:2a2:f35f:fa2d with SMTP id
 bo15-20020a17090b090f00b002a2f35ffa2dmr4661381pjb.17.1713653448574; 
 Sat, 20 Apr 2024 15:50:48 -0700 (PDT)
Received: from smtpclient.apple ([208.95.235.149])
 by smtp.gmail.com with ESMTPSA id
 r19-20020a17090aa09300b002a2e6fc09b5sm5129708pjp.29.2024.04.20.15.50.47
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 Apr 2024 15:50:48 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <861q709y5y.fsf@HIDDEN>
Date: Sat, 20 Apr 2024 15:50:36 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> <861q709y5y.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6.1.1)
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, Daniel Colascione <dancol@HIDDEN>,
 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Apr 20, 2024, at 2:32 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> From: Yuan Fu <casouri@HIDDEN>
>> Date: Sat, 20 Apr 2024 01:08:15 -0700
>> Cc: dancol@HIDDEN,
>> serg.foo@HIDDEN,
>> 69952 <at> debbugs.gnu.org
>>=20
>>=20
>>=20
>>> On Apr 13, 2024, at 12:41 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>>>>=20
>>>> And I have a question: what happens if the pdumper file dumped with
>>>> tree-sitter available is loaded by an Emacs session in which
>>>> tree-sitter is not available?  That can happen on Windows, for
>>>> example, if the tree-sitter library or the grammar library required
>>>> for recomputing the query is not available.  I think we need some =
code
>>>> to prevent Emacs from crashing on startup in that case.
>>=20
>> Yeah, being able to dump queries is certainly nice. There will be =
problems if the Emacs session that later loads the query either have a =
different grammar version loaded, or a difference grammar library for =
the same language, or outright doesn=E2=80=99t have tree-sitter like Eli =
mentioned. I don=E2=80=99t know if they are big enough problems to give =
up dumping queries, though.
>=20
> Giving up: no.  But I think the code which loads the queries from the
> pdumper file should be protected from crashing in those cases.  Can
> you suggest how to do that?

Would Emacs crash? If the dump file just contains the query (which is a =
string), then Emacs would just compile the query with =
treesit-query-compile, it could fail (due to the reasons I mentioned), =
but shouldn=E2=80=99t crash Emacs.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 20 Apr 2024 09:33:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 20 05:33:33 2024
Received: from localhost ([127.0.0.1]:35381 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ry76B-0002yH-6a
	for submit <at> debbugs.gnu.org; Sat, 20 Apr 2024 05:33:33 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48108)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ry761-0002wx-KN
 for 69952 <at> debbugs.gnu.org; Sat, 20 Apr 2024 05:33:28 -0400
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 <eliz@HIDDEN>)
 id 1ry75g-0000ii-6c; Sat, 20 Apr 2024 05:33:00 -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=i+dAJ5cO5LS3t5KkqlHCd2NlWZzu9ALS4tolbl2Jy1Q=; b=L2aOlbbyjkhdLUsvIxYI
 wScAaDFUT7UW6GGMQqoXDo5VTbBbamdiIoJ5qfDELPY4j4BnR5Hil5mZRIaxhvehq3TnpX0mW6IYG
 6+Z2mmw47X//Fbn2le2dbXCojj0EUMfVNSQqmpQM7Hv/jptjKyw6PL1n1taphXqyn4gs5qKcapH/T
 TlCmY0M6rmXv5Gbcl0c+yO8SgsK9F3UoXbiHPdbINEmmT9wr5ItMRUPwgyBMSGA1A8SJx5f32wTxe
 g/2F1dcDWK6O1Q45HwAjT5GbyLLUamcNMJA7KXjaCBFL5o9GS5z+ZFKqZXt1iw0rmbsy1VtvbznoY
 tbyOz7/GchL6gA==;
Date: Sat, 20 Apr 2024 12:32:57 +0300
Message-Id: <861q709y5y.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN> (message from
 Yuan Fu on Sat, 20 Apr 2024 01:08:15 -0700)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
 <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Yuan Fu <casouri@HIDDEN>
> Date: Sat, 20 Apr 2024 01:08:15 -0700
> Cc: dancol@HIDDEN,
>  serg.foo@HIDDEN,
>  69952 <at> debbugs.gnu.org
> 
> 
> 
> > On Apr 13, 2024, at 12:41 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> >> 
> >> And I have a question: what happens if the pdumper file dumped with
> >> tree-sitter available is loaded by an Emacs session in which
> >> tree-sitter is not available?  That can happen on Windows, for
> >> example, if the tree-sitter library or the grammar library required
> >> for recomputing the query is not available.  I think we need some code
> >> to prevent Emacs from crashing on startup in that case.
> 
> Yeah, being able to dump queries is certainly nice. There will be problems if the Emacs session that later loads the query either have a different grammar version loaded, or a difference grammar library for the same language, or outright doesn’t have tree-sitter like Eli mentioned. I don’t know if they are big enough problems to give up dumping queries, though.

Giving up: no.  But I think the code which loads the queries from the
pdumper file should be protected from crashing in those cases.  Can
you suggest how to do that?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 20 Apr 2024 08:08:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 20 04:08:51 2024
Received: from localhost ([127.0.0.1]:34972 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ry5mD-0000ot-9k
	for submit <at> debbugs.gnu.org; Sat, 20 Apr 2024 04:08:51 -0400
Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:47512)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1ry5mB-0000ni-HT
 for 69952 <at> debbugs.gnu.org; Sat, 20 Apr 2024 04:08:48 -0400
Received: by mail-pl1-x636.google.com with SMTP id
 d9443c01a7336-1e3ca546d40so24295395ad.3
 for <69952 <at> debbugs.gnu.org>; Sat, 20 Apr 2024 01:08:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713600507; x=1714205307; 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=c2iahCzrSthO+v5mXTNzbyK6BPfZ+XZ9TxlTdQJvpYw=;
 b=Cu6txPyPMRfneoHp2QsjRsvUzaARIeX6rcdwh8PVZVhLURs+Tp+SZ6wrk81QqgTC7+
 1zJnuLELKSchAWorynrBzNWh6/CYZA2vzlygGhszdsmhc4zhWuTOtdHmM31PJtjASNqI
 wuo+C22jTEM13ulKtlxJdP0LFkCuwhT7tIvJSoU2F9ilho7/wsgV0+heNZNJvZhU6hia
 site16M6U/FLgyb2dEkKvYuBXLKE7jYeRvUuyhXScQjrgiquxIHwBl5ce8yT4YTdN9ks
 BdaFoLCxbfXu/u6o7WRCA0qLpeTX9Loz9MpFdXwIqgNwDnEt5vs9h+z1NKhmSDdIuRln
 1SUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713600507; x=1714205307;
 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=c2iahCzrSthO+v5mXTNzbyK6BPfZ+XZ9TxlTdQJvpYw=;
 b=e1caDBJSiXJPqr9LMyjfzM7UUqzIrVBi/FLd0jU/scdZHfEEAHjoR2A/vzIFBB6gSn
 Tpcp0EtdJ0Vj22/Bgsag4i50Y1hJzfOvVkjJP+nR8BnB9Njtsw9ZOKk7GFuHLr9Kcyyg
 YNN1jZG4Luy6/1SLcKtsmPZn2Z0a67CWoal8BC+KPVZ2lDDTX+ES8qpLsUxBtXgc8kw/
 iTiDxIS9xMpx0LZb+vLrmx4Sc/0R7VhR4pLFxQkG2I2+hs4VfKWCh3bxWkqUqPKftYtt
 Zfq+lYwVgpC4E0YXmFNBflxFTnwsqNlxUnFdtOvPEtRlxYt4gqxemxhExaOWl6v73lUo
 Kh7Q==
X-Forwarded-Encrypted: i=1;
 AJvYcCWhB+//BZmtXplTG0CCAITGyV1MXmnciSi3FCotfJ1dQkNuWiK783wO5a7ulx4V1WJbFJei7V2x2Pw0WWpW9r/lPbZfy3c=
X-Gm-Message-State: AOJu0Yyda6fNzDfi9RGKti9VxaaaNP+ccemYxZG9X1EbOSdovsrofA2k
 47mpcOjnXIjJTHDkyEUAIdJN50n+CIwNDk81ps8ROPpNbc/LMSbb
X-Google-Smtp-Source: AGHT+IE3vjIo39KuHiNSv7SEgjQ5O7390ifBRq8J4d4Vj5ejzhgFhf+iltv4xbx87MI3cJ6ny/YNLg==
X-Received: by 2002:a17:903:32cf:b0:1e2:23b9:eb24 with SMTP id
 i15-20020a17090332cf00b001e223b9eb24mr5240159plr.33.1713600506758; 
 Sat, 20 Apr 2024 01:08:26 -0700 (PDT)
Received: from smtpclient.apple ([2601:641:300:4910:21b4:7382:dc:3202])
 by smtp.gmail.com with ESMTPSA id
 ba5-20020a170902720500b001e2b4f513e1sm4559456plb.106.2024.04.20.01.08.25
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 Apr 2024 01:08:26 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\))
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <86le5hr9oj.fsf@HIDDEN>
Date: Sat, 20 Apr 2024 01:08:15 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <C75CCCE1-DE71-4748-92C9-EBA8D57BB576@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <86le5hr9oj.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, dancol@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Apr 13, 2024, at 12:41 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
> Ping!  Daniel and Yuan, any comments on this proposal?
>=20
>> Cc: 69952 <at> debbugs.gnu.org, Daniel Colascione <dancol@HIDDEN>,
>> Yuan Fu <casouri@HIDDEN>
>> Date: Sat, 23 Mar 2024 09:08:21 +0200
>> From: Eli Zaretskii <eliz@HIDDEN>
>>=20
>>> Date: Sat, 23 Mar 2024 03:27:18 +0000
>>> From: Sergey Vinokurov <serg.foo@HIDDEN>
>>>=20
>>> This patch aims to allow more things to be dumped. In particular,=20
>>> compiled treesitter queries can be easily dumped by storing their =
source=20
>>> so that they will be recompiled on load.
>>>=20
>>> I noticed that in my config compiled quires are created somewhere =
which=20
>>> prevents me dumping with standard Emacs build. But with this patch I =
can=20
>>> dump successfully and not bother finding out who produced the =
queries.
>>>=20
>>> It seems like there should be no drawbacks in allowing more things =
to be=20
>>> dumped, please correct me if I'm wrong.
>>=20
>> Thanks.  I added Daniel and Yuan to the discussion, in case they have
>> comments.
>>=20
>> And I have a question: what happens if the pdumper file dumped with
>> tree-sitter available is loaded by an Emacs session in which
>> tree-sitter is not available?  That can happen on Windows, for
>> example, if the tree-sitter library or the grammar library required
>> for recomputing the query is not available.  I think we need some =
code
>> to prevent Emacs from crashing on startup in that case.

Yeah, being able to dump queries is certainly nice. There will be =
problems if the Emacs session that later loads the query either have a =
different grammar version loaded, or a difference grammar library for =
the same language, or outright doesn=E2=80=99t have tree-sitter like Eli =
mentioned. I don=E2=80=99t know if they are big enough problems to give =
up dumping queries, though.

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 13 Apr 2024 07:42:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 13 03:42:17 2024
Received: from localhost ([127.0.0.1]:60000 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rvY1g-0004HM-0w
	for submit <at> debbugs.gnu.org; Sat, 13 Apr 2024 03:42:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47112)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rvY1b-0004FO-8f
 for 69952 <at> debbugs.gnu.org; Sat, 13 Apr 2024 03:42:12 -0400
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 <eliz@HIDDEN>)
 id 1rvY1I-00036l-DG; Sat, 13 Apr 2024 03:41:55 -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=S0tH3X1xACK94/4Twe14EsTNmgH+a/LiBPuM3mUV3iE=; b=UEajAPy72gke
 +GmzZMRFe+uXGI9iZ78FilFJ/1/EUbfDNQbc0qMbYZh5iMjFhck848B7LbMPmqQ3FInX7G+6MXy4T
 MDqqSK5nxsbrSnSfZKnkItFp+vZ6QvP4gYm8vZwpK84RApG2mZy8FOM0VEv7wLO/gdX8eNqQON6GZ
 SB7cNgn1ANqtb7yzii5VS+SME/QbgARE60rmR3iluf/EXtHsKUfhssc8MMmSBNp36HqPortqVeb7m
 VhPH3sJ4YRj33Qo4tu+qy9I/SZtbHnTNLKuAHclL92TEqi/SEPG8gW+CrN5TFOa1XXAmZEielC+L8
 vekDlDo0W2zNpAYJH1zl6A==;
Date: Sat, 13 Apr 2024 10:41:48 +0300
Message-Id: <86le5hr9oj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: dancol@HIDDEN, casouri@HIDDEN
In-Reply-To: <86r0g1zaqi.fsf@HIDDEN> (message from Eli Zaretskii on Sat, 23
 Mar 2024 09:08:21 +0200)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: serg.foo@HIDDEN, 69952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!  Daniel and Yuan, any comments on this proposal?

> Cc: 69952 <at> debbugs.gnu.org, Daniel Colascione <dancol@HIDDEN>,
>  Yuan Fu <casouri@HIDDEN>
> Date: Sat, 23 Mar 2024 09:08:21 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> > Date: Sat, 23 Mar 2024 03:27:18 +0000
> > From: Sergey Vinokurov <serg.foo@HIDDEN>
> > 
> > This patch aims to allow more things to be dumped. In particular, 
> > compiled treesitter queries can be easily dumped by storing their source 
> > so that they will be recompiled on load.
> > 
> > I noticed that in my config compiled quires are created somewhere which 
> > prevents me dumping with standard Emacs build. But with this patch I can 
> > dump successfully and not bother finding out who produced the queries.
> > 
> > It seems like there should be no drawbacks in allowing more things to be 
> > dumped, please correct me if I'm wrong.
> 
> Thanks.  I added Daniel and Yuan to the discussion, in case they have
> comments.
> 
> And I have a question: what happens if the pdumper file dumped with
> tree-sitter available is loaded by an Emacs session in which
> tree-sitter is not available?  That can happen on Windows, for
> example, if the tree-sitter library or the grammar library required
> for recomputing the query is not available.  I think we need some code
> to prevent Emacs from crashing on startup in that case.
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 23 Mar 2024 14:42:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 23 10:42:40 2024
Received: from localhost ([127.0.0.1]:33032 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ro2a0-0000zy-32
	for submit <at> debbugs.gnu.org; Sat, 23 Mar 2024 10:42:40 -0400
Received: from mail-wr1-f50.google.com ([209.85.221.50]:51414)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <serg.foo@HIDDEN>) id 1ro2Zy-0000za-31
 for 69952 <at> debbugs.gnu.org; Sat, 23 Mar 2024 10:42:38 -0400
Received: by mail-wr1-f50.google.com with SMTP id
 ffacd0b85a97d-33e17342ea7so1452075f8f.2
 for <69952 <at> debbugs.gnu.org>; Sat, 23 Mar 2024 07:41:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1711204851; x=1711809651; darn=debbugs.gnu.org;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :from:to:cc:subject:date:message-id:reply-to;
 bh=pZuBjUYub6pT+uGj05XvbJfbCOYVtrJVYWy225Fo5qM=;
 b=eb0S13tTSq2K+lDNVikSLOXRFWCVFUCd45OtmSi5PyDKagXiFLqWNu1ylAkjXbQIKN
 RHOCzbQLVSS3/SQnokq9UBt1/WOXTaBRUxs/Y5LLxmw7scIGM0ynRSHKMXQPZRQXvGbg
 t8kK2VL2p3MM0jkx/WKiRB5xAyqJJpfw9JvJm+7UpU7mOEAdm4kxlS/gEzKykfrAG8W3
 NFRYbMAxVpJi676vEMZmiNJmIexW4AnZtt8vWtl5ix0n3Lk9Zb9Cljd6p4KFYL9/K/9R
 IavYlSCJ5o6+D8vOEic2sOiS2XRIeAxB1P5hhbQH8XkVSdWRF8279v9s9dVCFaAvrlOe
 ysfg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1711204851; x=1711809651;
 h=content-transfer-encoding:in-reply-to:from:references:cc:to
 :content-language:subject:user-agent:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=pZuBjUYub6pT+uGj05XvbJfbCOYVtrJVYWy225Fo5qM=;
 b=f5pyuvD/2f2LqaAA9ucDAK4gmv8BxqnbN8P4A40a1BLfhV7s3axid/atXZG7Thy/vU
 e8SMTl4Esj+021BcByHLrzz28kbtR7VnSBsoNmAoVVtlzkTODTXWr+PW0XV97AjShpUk
 NgahkFUQHlmPrJ1rYghmdPlERoN9V5kkFq9pkU1kiOiQT2FcUMUUrX/otLyvTiIuAHLQ
 mNVv/5RDr67FJXn/7492sJlmzaoNmDHQcH4G13GMwMsurqiDKPNtUe1bB+zse4ea/V5v
 Qi2HMs0FmkupdBsA6dp31CHk/EjUCVz1bqerCkodY5b28lgpkaqaKzM2ZLLyBAVpgwav
 jtsw==
X-Gm-Message-State: AOJu0YwC7my4lIHV5FC9uKFN/xbvvkqqfK5qWooUmI/yleNXVmgVukkr
 IpQBKf7C45s+94cWs9qikbUzNBLg6x67R2bAVAXBt923U+VgwTg7vNcknbCSmHN1kBn/
X-Google-Smtp-Source: AGHT+IEOqRLbvZxY0FlUadFD4M0Fva0lPo6g4u+5itiwvqPfNIXc5YMi9EroxkTDGSr3O4T708RBLw==
X-Received: by 2002:adf:e011:0:b0:33e:c604:dd50 with SMTP id
 s17-20020adfe011000000b0033ec604dd50mr1425203wrh.51.1711198417920; 
 Sat, 23 Mar 2024 05:53:37 -0700 (PDT)
Received: from [192.168.1.107] ([152.37.81.238])
 by smtp.gmail.com with ESMTPSA id
 b10-20020a05600003ca00b0033d640c8942sm4425042wrg.10.2024.03.23.05.53.37
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 23 Mar 2024 05:53:37 -0700 (PDT)
Message-ID: <61a44fd0-289c-4eed-aa04-05b34617f10f@HIDDEN>
Date: Sat, 23 Mar 2024 12:53:37 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
Content-Language: en-GB
To: Eli Zaretskii <eliz@HIDDEN>
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN>
From: Sergey Vinokurov <serg.foo@HIDDEN>
In-Reply-To: <86r0g1zaqi.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 69952
Cc: 69952 <at> debbugs.gnu.org, Daniel Colascione <dancol@HIDDEN>,
 Yuan Fu <casouri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 23/03/2024 07:08, Eli Zaretskii wrote:
>> Date: Sat, 23 Mar 2024 03:27:18 +0000
>> From: Sergey Vinokurov <serg.foo@HIDDEN>
>>
>> This patch aims to allow more things to be dumped. In particular,
>> compiled treesitter queries can be easily dumped by storing their source
>> so that they will be recompiled on load.
>>
>> I noticed that in my config compiled quires are created somewhere which
>> prevents me dumping with standard Emacs build. But with this patch I can
>> dump successfully and not bother finding out who produced the queries.
>>
>> It seems like there should be no drawbacks in allowing more things to be
>> dumped, please correct me if I'm wrong.
> 
> Thanks.  I added Daniel and Yuan to the discussion, in case they have
> comments.
> 
> And I have a question: what happens if the pdumper file dumped with
> tree-sitter available is loaded by an Emacs session in which
> tree-sitter is not available?  That can happen on Windows, for
> example, if the tree-sitter library or the grammar library required
> for recomputing the query is not available.  I think we need some code
> to prevent Emacs from crashing on startup in that case.

According to c2ecb08775dc24618de507d2d1ce0f9b0debe17e, treesitter 
queries are compiled lazily on fist use. When loading dump file in an 
Emacs with missing grammar library the user should encounter an error on 
first use of the query.

Quick testing shows that dump file can be loaded even with grammar 
definitions removed. Compiled queries are still there in elisp and 
there's no error during load.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 23 Mar 2024 14:10:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 23 10:10:18 2024
Received: from localhost ([127.0.0.1]:59234 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ro24f-000803-8D
	for submit <at> debbugs.gnu.org; Sat, 23 Mar 2024 10:10:18 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33160)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1ro1U7-0005tC-94
 for 69952 <at> debbugs.gnu.org; Sat, 23 Mar 2024 09:32:32 -0400
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 <eliz@HIDDEN>)
 id 1ro17u-0004ed-UC; Sat, 23 Mar 2024 09:09:35 -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=0Yx4ciWlz2Ous0YYqUCGsnXnFJOTNg/urEU47lqI+bw=; b=lLKIEig/Gv+s
 sOEL5B5pFrXSrUTZ2wwQv+352r+DNbXCxvMcBiAnwUf4yqquLPe/9d0EFLYLdKZwVpntUyriRC6Oi
 XDfSVWYdET+t749ScM/hE/7k+TpfKtt4sO1ZgwrWwCTPJ1ycdifVcJVt9w3Y1oUCvHHWPIpVvglhb
 2DYe7bT72edXkZME1MPiUqcCaLolDRyiQE+MpprbJLGY6OXAC2yJ7BhvATx0DGFmDpjyYU2KtIYtx
 jxR/R8laPxzoTCL9QHldziQgFyTTaqLhBPoTcX6k/DaMGzLpXno+RbZGGBei0p/ZRg5/DSwqw5MWP
 P+oYUDQRuMpnVDLRxa9M5A==;
Date: Sat, 23 Mar 2024 15:09:30 +0200
Message-Id: <8634shyu0l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sergey Vinokurov <serg.foo@HIDDEN>
In-Reply-To: <61a44fd0-289c-4eed-aa04-05b34617f10f@HIDDEN> (message from
 Sergey Vinokurov on Sat, 23 Mar 2024 12:53:37 +0000)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
 <86r0g1zaqi.fsf@HIDDEN> <61a44fd0-289c-4eed-aa04-05b34617f10f@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: 69952 <at> debbugs.gnu.org, dancol@HIDDEN, casouri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 23 Mar 2024 12:53:37 +0000
> Cc: 69952 <at> debbugs.gnu.org, Daniel Colascione <dancol@HIDDEN>,
>  Yuan Fu <casouri@HIDDEN>
> From: Sergey Vinokurov <serg.foo@HIDDEN>
> 
> On 23/03/2024 07:08, Eli Zaretskii wrote:
> >> Date: Sat, 23 Mar 2024 03:27:18 +0000
> >> From: Sergey Vinokurov <serg.foo@HIDDEN>
> >>
> >> This patch aims to allow more things to be dumped. In particular,
> >> compiled treesitter queries can be easily dumped by storing their source
> >> so that they will be recompiled on load.
> >>
> >> I noticed that in my config compiled quires are created somewhere which
> >> prevents me dumping with standard Emacs build. But with this patch I can
> >> dump successfully and not bother finding out who produced the queries.
> >>
> >> It seems like there should be no drawbacks in allowing more things to be
> >> dumped, please correct me if I'm wrong.
> > 
> > Thanks.  I added Daniel and Yuan to the discussion, in case they have
> > comments.
> > 
> > And I have a question: what happens if the pdumper file dumped with
> > tree-sitter available is loaded by an Emacs session in which
> > tree-sitter is not available?  That can happen on Windows, for
> > example, if the tree-sitter library or the grammar library required
> > for recomputing the query is not available.  I think we need some code
> > to prevent Emacs from crashing on startup in that case.
> 
> According to c2ecb08775dc24618de507d2d1ce0f9b0debe17e, treesitter 
> queries are compiled lazily on fist use. When loading dump file in an 
> Emacs with missing grammar library the user should encounter an error on 
> first use of the query.
> 
> Quick testing shows that dump file can be loaded even with grammar 
> definitions removed. Compiled queries are still there in elisp and 
> there's no error during load.

OK, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at 69952 <at> debbugs.gnu.org:


Received: (at 69952) by debbugs.gnu.org; 23 Mar 2024 07:09:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 23 03:09:13 2024
Received: from localhost ([127.0.0.1]:58864 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rnvVB-0001hE-1e
	for submit <at> debbugs.gnu.org; Sat, 23 Mar 2024 03:09:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55116)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rnvV8-0001gh-Bx
 for 69952 <at> debbugs.gnu.org; Sat, 23 Mar 2024 03:09:11 -0400
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 <eliz@HIDDEN>)
 id 1rnvUN-0008Cq-G9; Sat, 23 Mar 2024 03:08:23 -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=pKX63wzkUA36OKWli1xFzCTr7T71deL7EbedF3Zcpe0=; b=pqxSFbyym3ma
 x4Df+4ZVwlK7SJd7Fm8/ySZZaD4b1wb2ZG5S4Q/5PgL4YPVwuJTrUMoudlToaDCub7N342itwrMte
 CDlD0ekdMGMsNeNfwS3NWvjj6O9ZXdUXy3KwCluMUrN4JJkyh+vPlMl4nNIxYZ97OU15KLI6XjWdK
 odkue14LuzS1gRc6b5RrlNFmNfpn1XWlYgD+t+qYFmfEBO5flLZvNsUlOKpgvk3jLZ5Pf35h2gEb8
 FF7tUR0bZvrTMbJj+HSzgIDaBlxan+T6+8wqGVX7DeC4GEoQZU3iK07pSSSJGS/N4ds5/B9eTFa/U
 kWWX6t38pJXoNdAWmtGu9g==;
Date: Sat, 23 Mar 2024 09:08:21 +0200
Message-Id: <86r0g1zaqi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sergey Vinokurov <serg.foo@HIDDEN>
In-Reply-To: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN> (message from
 Sergey Vinokurov on Sat, 23 Mar 2024 03:27:18 +0000)
Subject: Re: bug#69952: [PATCH] Support pdumping compiled queries by dumping
 their source
References: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69952
Cc: 69952 <at> debbugs.gnu.org, Daniel Colascione <dancol@HIDDEN>,
 Yuan Fu <casouri@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 23 Mar 2024 03:27:18 +0000
> From: Sergey Vinokurov <serg.foo@HIDDEN>
> 
> This patch aims to allow more things to be dumped. In particular, 
> compiled treesitter queries can be easily dumped by storing their source 
> so that they will be recompiled on load.
> 
> I noticed that in my config compiled quires are created somewhere which 
> prevents me dumping with standard Emacs build. But with this patch I can 
> dump successfully and not bother finding out who produced the queries.
> 
> It seems like there should be no drawbacks in allowing more things to be 
> dumped, please correct me if I'm wrong.

Thanks.  I added Daniel and Yuan to the discussion, in case they have
comments.

And I have a question: what happens if the pdumper file dumped with
tree-sitter available is loaded by an Emacs session in which
tree-sitter is not available?  That can happen on Windows, for
example, if the tree-sitter library or the grammar library required
for recomputing the query is not available.  I think we need some code
to prevent Emacs from crashing on startup in that case.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Mar 2024 03:28:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 22 23:28:12 2024
Received: from localhost ([127.0.0.1]:45882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rns3I-0008CJ-BW
	for submit <at> debbugs.gnu.org; Fri, 22 Mar 2024 23:28:12 -0400
Received: from lists.gnu.org ([209.51.188.17]:37258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <serg.foo@HIDDEN>) id 1rns3D-0008C4-Jc
 for submit <at> debbugs.gnu.org; Fri, 22 Mar 2024 23:28:11 -0400
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 <serg.foo@HIDDEN>)
 id 1rns2Y-0001qb-6Y
 for bug-gnu-emacs@HIDDEN; Fri, 22 Mar 2024 23:27:26 -0400
Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <serg.foo@HIDDEN>)
 id 1rns2W-00021f-Jt
 for bug-gnu-emacs@HIDDEN; Fri, 22 Mar 2024 23:27:25 -0400
Received: by mail-lj1-x22f.google.com with SMTP id
 38308e7fff4ca-2d46dd5f222so34529391fa.1
 for <bug-gnu-emacs@HIDDEN>; Fri, 22 Mar 2024 20:27:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1711164440; x=1711769240; darn=gnu.org;
 h=subject:from:to:content-language:user-agent:mime-version:date
 :message-id:from:to:cc:subject:date:message-id:reply-to;
 bh=d7cLsBOIeVB39UbDfJN0tCFWuhdQBG00mGvELK2vnrs=;
 b=I41AEwT3amohKkGD59s0fmBD5X7DHvj8fewhVlK/guumcU98A4U563PwiO/xD0zA1V
 KNnbwyTnWL+iqHDwyKUxb01Hdw8pN9h42sC5vSR43hQrDMo//w6bewh2QmxxZKVv6ZNo
 cuWpBllzcEf0uHCQ9QE2cm9St22vMvgzCFoQgN00yZUBylgDUEpapRDrbQebYHWgKLnq
 KwzwLV5QHqCu2vid0Qe9xXDKEZBMI7Xuv/oB2yK6thI3FMgSs0MeSzIUJZETuVNQGn0J
 z7dlEU4vuo8rVB3U+iOc0BUOIDz7pmtZL5N1j5Ovi6i4jT6AH1a5U6w0+M+n/A0gWjQm
 E8fQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1711164440; x=1711769240;
 h=subject:from:to:content-language:user-agent:mime-version:date
 :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=d7cLsBOIeVB39UbDfJN0tCFWuhdQBG00mGvELK2vnrs=;
 b=My7YjNQ5w50EK2E8ECi4Dvx7lzXA2aLUcYQbi9g+6naGtps1FSwHy0jEFY/pQn1lrm
 Qo6phuy1ECziZZtgxolsxqVHEmnPjHsVNe29R3KtSKMzwK7Kv1wywp2ffqf1XYeINDYX
 iq1DLYQ2FDXZ096iuRNkcfI3jUqCduX5tlWYk43J3eam4J8JJ7hazKcanxr23hyeI9QF
 1hiOnQNBfM8ppFyeuJTv5rzDTI+BBwtHy2iV9hU8Gfjl13jX5mZrIBHgU19a+098LNys
 wwDw7wJHACNGo5yynEp9GRNJFdCRjBWonSIITDbCFD2hMZcitVHmW4zADIgS3yZWCbbX
 b1IQ==
X-Gm-Message-State: AOJu0YwFoeZaAgJbTiTMzOSj0eNEwrsGvs7hqkvy5Y0Mmy+N4DaT/bF1
 g/yKmeWiUZNhqz0nOtNOgSZhYwE/CFrj4HiQuvx868brM/BiPPimCKKFS8G8sTQUUQ==
X-Google-Smtp-Source: AGHT+IEOdeJQP5Dk7//fE+G8P4d2LUUmxhty7SDE21QThiyfGewDTA+n2LGo2S2C4Ltn/J1CQXRhTQ==
X-Received: by 2002:a2e:87cf:0:b0:2d4:514b:428 with SMTP id
 v15-20020a2e87cf000000b002d4514b0428mr819688ljj.6.1711164439816; 
 Fri, 22 Mar 2024 20:27:19 -0700 (PDT)
Received: from [192.168.1.107] ([152.37.81.238])
 by smtp.gmail.com with ESMTPSA id
 o3-20020a5d62c3000000b0033ec94c6277sm3395042wrv.115.2024.03.22.20.27.19
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 22 Mar 2024 20:27:19 -0700 (PDT)
Content-Type: multipart/mixed; boundary="------------NmvpSr2AGYOJcfd70HPjCOZD"
Message-ID: <c47199ce-1b89-44b2-b714-57d44027f895@HIDDEN>
Date: Sat, 23 Mar 2024 03:27:18 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
To: bug-gnu-emacs@HIDDEN
From: Sergey Vinokurov <serg.foo@HIDDEN>
Subject: [PATCH] Support pdumping compiled queries by dumping their source
Received-SPF: pass client-ip=2a00:1450:4864:20::22f;
 envelope-from=serg.foo@HIDDEN; helo=mail-lj1-x22f.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

This is a multi-part message in MIME format.
--------------NmvpSr2AGYOJcfd70HPjCOZD
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

This patch aims to allow more things to be dumped. In particular, 
compiled treesitter queries can be easily dumped by storing their source 
so that they will be recompiled on load.

I noticed that in my config compiled quires are created somewhere which 
prevents me dumping with standard Emacs build. But with this patch I can 
dump successfully and not bother finding out who produced the queries.

It seems like there should be no drawbacks in allowing more things to be 
dumped, please correct me if I'm wrong.

Regards,
Sergey
--------------NmvpSr2AGYOJcfd70HPjCOZD
Content-Type: text/x-patch; charset=UTF-8; name="pdump.patch"
Content-Disposition: attachment; filename="pdump.patch"
Content-Transfer-Encoding: base64

RnJvbSA4YjcyNjMxODFlZDM1OGZlODhhMzU4MzU1YzIyNjliOTMzNzk3MDNjIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBTZXJnZXkgVmlub2t1cm92IDxzZXJnLmZvb0BnbWFp
bC5jb20+CkRhdGU6IFN1biwgNiBBdWcgMjAyMyAxNjoyNDoyOSArMDEwMApTdWJqZWN0OiBb
UEFUQ0hdIFN1cHBvcnQgY29tcGlsZWQgcXVlcmllcyBpbiBwZHVtcCBieSBkdW1waW5nIHNv
dXJjZQoKKiBzcmMvcGR1bXBlci5jIChkdW1wX3ZlY3Rvcmxpa2UpOiBEdW1wIGNvbXBpbGVk
IHF1ZXJpZXMKKiBzcmMvcGR1bXBlci5jIChkdW1wX3RyZWVzaXRfY29tcGlsZWRfcXVlcnkp
OiBOZXcgZnVuY3Rpb24KLS0tCiBzcmMvcGR1bXBlci5jIHwgMjMgKysrKysrKysrKysrKysr
KysrKysrKy0KIDEgZmlsZSBjaGFuZ2VkLCAyMiBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9u
KC0pCgpkaWZmIC0tZ2l0IGEvc3JjL3BkdW1wZXIuYyBiL3NyYy9wZHVtcGVyLmMKaW5kZXgg
YzdlYmIzOGRlYTUuLmYyZGQyNGM1NmE2IDEwMDY0NAotLS0gYS9zcmMvcGR1bXBlci5jCisr
KyBiL3NyYy9wZHVtcGVyLmMKQEAgLTQ0LDYgKzQ0LDcgQEAKICNpbmNsdWRlICJzeXN0aW1l
LmgiCiAjaW5jbHVkZSAidGhyZWFkLmgiCiAjaW5jbHVkZSAiYmlnbnVtLmgiCisjaW5jbHVk
ZSAidHJlZXNpdC5oIgogCiAjaWZkZWYgQ0hFQ0tfU1RSVUNUUwogIyBpbmNsdWRlICJkbXBz
dHJ1Y3QuaCIKQEAgLTIyMTUsNiArMjIxNiwyMSBAQCBkdW1wX2ZpbmFsaXplciAoc3RydWN0
IGR1bXBfY29udGV4dCAqY3R4LAogICByZXR1cm4gZmluaXNoX2R1bXBfcHZlYyAoY3R4LCAm
b3V0LT5oZWFkZXIpOwogfQogCisjaWZkZWYgSEFWRV9UUkVFX1NJVFRFUgorc3RhdGljIGR1
bXBfb2ZmCitkdW1wX3RyZWVzaXRfY29tcGlsZWRfcXVlcnkgKHN0cnVjdCBkdW1wX2NvbnRl
eHQgKmN0eCwKKwkJCSAgICAgc3RydWN0IExpc3BfVFNfUXVlcnkgKnF1ZXJ5KQoreworICBT
VEFSVF9EVU1QX1BWRUMgKGN0eCwgJnF1ZXJ5LT5oZWFkZXIsIHN0cnVjdCBMaXNwX1RTX1F1
ZXJ5LCBvdXQpOworICBkdW1wX2ZpZWxkX2x2IChjdHgsICZvdXQtPmxhbmd1YWdlLCBxdWVy
eSwgJnF1ZXJ5LT5sYW5ndWFnZSwgV0VJR0hUX1NUUk9ORyk7CisgIGR1bXBfZmllbGRfbHYg
KGN0eCwgJm91dC0+c291cmNlLCBxdWVyeSwgJnF1ZXJ5LT5zb3VyY2UsIFdFSUdIVF9TVFJP
TkcpOworICAvKiBSZWNvbXBpbGUgdGhlc2UgYWZ0ZXIgbG9hZCAqLworICBvdXQtPnF1ZXJ5
ID0gTlVMTDsKKyAgb3V0LT5jdXJzb3IgPSBOVUxMOworICByZXR1cm4gZmluaXNoX2R1bXBf
cHZlYyAoY3R4LCAmb3V0LT5oZWFkZXIpOworfQorI2VuZGlmCisKIHN0cnVjdCBiaWdudW1f
cmVsb2FkX2luZm8KIHsKICAgZHVtcF9vZmYgZGF0YV9sb2NhdGlvbjsKQEAgLTMxMDgsNiAr
MzEyNCwxMiBAQCBkdW1wX3ZlY3Rvcmxpa2UgKHN0cnVjdCBkdW1wX2NvbnRleHQgKmN0eCwK
ICAgICAgICAgICByZXR1cm4gRFVNUF9PQkpFQ1RfSVNfUlVOVElNRV9NQUdJQzsKICAgICAg
ICAgfQogICAgICAgYnJlYWs7CisjaWZkZWYgSEFWRV9UUkVFX1NJVFRFUgorICAgIGNhc2Ug
UFZFQ19UU19DT01QSUxFRF9RVUVSWToKKyAgICAgIHJldHVybiBkdW1wX3RyZWVzaXRfY29t
cGlsZWRfcXVlcnkgKGN0eCwgWFRTX0NPTVBJTEVEX1FVRVJZIChsdikpOworI2Vsc2UKKyAg
ICBjYXNlIFBWRUNfVFNfQ09NUElMRURfUVVFUlk6CisjZW5kaWYKICAgICBjYXNlIFBWRUNf
V0lORE9XX0NPTkZJR1VSQVRJT046CiAgICAgY2FzZSBQVkVDX09USEVSOgogICAgIGNhc2Ug
UFZFQ19YV0lER0VUOgpAQCAtMzEyMiw3ICszMTQ0LDYgQEAgZHVtcF92ZWN0b3JsaWtlIChz
dHJ1Y3QgZHVtcF9jb250ZXh0ICpjdHgsCiAgICAgY2FzZSBQVkVDX0ZSRUU6CiAgICAgY2Fz
ZSBQVkVDX1RTX1BBUlNFUjoKICAgICBjYXNlIFBWRUNfVFNfTk9ERToKLSAgICBjYXNlIFBW
RUNfVFNfQ09NUElMRURfUVVFUlk6CiAgICAgICBicmVhazsKICAgICB9CiAgIGNoYXIgbXNn
WzYwXTsKLS0gCjIuNDMuMQoK

--------------NmvpSr2AGYOJcfd70HPjCOZD--




Acknowledgement sent to Sergey Vinokurov <serg.foo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#69952; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 1 Jun 2024 17:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.