From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aymeric Agon-Rambosson Newsgroups: gmane.emacs.devel Subject: Re: Finalizing 'inhibit-automatic-native-compilation' Date: Tue, 14 Feb 2023 11:36:15 +0100 Message-ID: <87y1p01qlc.fsf@EBx360> References: <837cx8cey0.fsf@gnu.org> <87sffo3as7.fsf@melete.silentflame.com> <83v8kkxzzx.fsf@gnu.org> <87r0v811pm.fsf@melete.silentflame.com> <87cz6nxdqy.fsf@X570GP> <83357irhnv.fsf@gnu.org> <87ttzy2lgi.fsf@X570GP> <83a61pprm8.fsf@gnu.org> <87mt5ncjuk.fsf@X570GP> <83cz6jm9mo.fsf@gnu.org> <87a61lkjb7.fsf@X570GP> <87pmahs9um.fsf@EBx360> <877cwoo6ru.fsf@X570GP> <83bkm0jxbr.fsf@gnu.org> <87ttzq25m6.fsf@X570GP> <837cwmhlgs.fsf@gnu.org> <87pmae1wrs.fsf@X570GP> <83v8k6fxy5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10897"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.10; emacs 28.1 Cc: akrl@sdf.org, spwhitton@spwhitton.name, monnier@iro.umontreal.ca, emacs-devel@gnu.org, larsi@gnus.org, rlb@defaultvalue.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 14 12:59:01 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRtxd-0002ah-1m for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Feb 2023 12:59:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRtx0-0001iF-Sz; Tue, 14 Feb 2023 06:58:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRsfs-00080E-Mt for emacs-devel@gnu.org; Tue, 14 Feb 2023 05:36:37 -0500 Original-Received: from forward501c.mail.yandex.net ([178.154.239.209]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRsfm-0003lQ-Gd; Tue, 14 Feb 2023 05:36:32 -0500 Original-Received: from iva3-dd2bb2ff2b5f.qloud-c.yandex.net (iva3-dd2bb2ff2b5f.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:7611:0:640:dd2b:b2ff]) by forward501c.mail.yandex.net (Yandex) with ESMTP id EB9525F233; Tue, 14 Feb 2023 13:36:22 +0300 (MSK) Original-Received: by iva3-dd2bb2ff2b5f.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id JagXxh1ZfW21-GqJIKGQe; Tue, 14 Feb 2023 13:36:22 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1676370982; bh=DJalAGQ8+waNQGGR8tjaH5QIn9Dr28vQu7QtrTRzxBA=; h=Cc:Message-ID:References:Date:Subject:In-reply-to:To:From; b=OubeCE6M3u1PLOo5b4VSLvgg+Wt6ixfuhf1Qy4iVYXsrcfXWKGtTHLjfERNic50pL V09NJcCzGKcG0JfBNeCfPmpZ/iUFNo/T/7SDa9M+hr6KwxyzUZ+/AxKDKN3vssoDTl a00ELHg9qMLnAHOV99hB+0L14d3/OZHjRhCU8gdU= Authentication-Results: iva3-dd2bb2ff2b5f.qloud-c.yandex.net; dkim=pass header.i=@yandex.com In-reply-to: <83v8k6fxy5.fsf@gnu.org> Received-SPF: pass client-ip=178.154.239.209; envelope-from=aymeric.agon@yandex.com; helo=forward501c.mail.yandex.net 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 14 Feb 2023 06:58:22 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303270 Archived-At: Le dimanche 12 f=C3=A9vrier 2023 =C3=A0 22:09, Eli Zaretskii = =20 a =C3=A9crit : > But it caused trouble in other situations, and is very hard to=20 > support > portably. Any code that removes a .eln file that is being used=20 > by the > very Emacs session which removes it is building on non-portable > assumptions. > > So I very much want to remove this part from Emacs. I probably wasn't very clear. >From what I understand, passing nil as last argument to=20 `comp--native-compile' only means that a temporary file will be=20 created in `temporary-file-directory' to store the output of the=20 native compilation process. On top of that, in the current state of emacs, when the result of=20 this native compilation is a trampoline, this temporary .eln file=20 is deleted after the trampoline is loaded in memory to be=20 associated with the primitive. This last part (the deletion after loading) is what you want to=20 get rid of, and I agree this is the sensible thing to do. To be=20 clear, I was not asking that you keep that part. But the first part (the creating of a temporary file in=20 `temporary-file-directory') is completely independent from the=20 last one, or am I missing something ? It should still be possible=20 to output the result of a native compilation to a temporary file,=20 without having to remove that file afterwards ? So something like (setq comp-enable-subr-trampolines=20 'compile-but-no-output) would *only* mean : output to a temporary=20 file in `temporary-file-directory'. It wouldn't also mean "and=20 remove it afterwards". This meaning is perfectly compatible with=20 the removal of the deletion after loading logic. This is approximately what (setq comp-enable-subr-trampolines=20 temporary-file-directory) would mean, except the two are not=20 exactly equivalent. In the first case, `temporary-file-directory'=20 would be evaluated when the temporary file needs to be created,=20 which would be a guarantee that the file creation always works. In=20 the second case, since `temporary-file-directory' is evaluated at=20 the time of the setq, we would need its value at the time of the=20 eval to remain valid for the whole duration of the emacs=20 session. The first one is preferable to us because it always works=20 and respects any modification we might make to=20 `temporary-file-directory' for whatever reason.