From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: Finalizing 'inhibit-automatic-native-compilation' Date: Mon, 06 Feb 2023 10:21:36 +0000 Message-ID: References: <837cx8cey0.fsf@gnu.org> <440f4cbd46a2db3c9963bc32aba9abe6cbe108ea.camel@gmail.com> <83a61tthu7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36820"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Liliana Marie Prikler , emacs-devel@gnu.org, larsi@gnus.org, monnier@iro.umontreal.ca, rlb@defaultvalue.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 06 11:22:14 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 1pOydZ-0009N7-Ex for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Feb 2023 11:22:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOyd7-0003pY-HD; Mon, 06 Feb 2023 05:21:45 -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 1pOyd5-0003pG-DR for emacs-devel@gnu.org; Mon, 06 Feb 2023 05:21:43 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOyd3-0001R0-NI; Mon, 06 Feb 2023 05:21:43 -0500 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 316ALa5h017489 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 6 Feb 2023 10:21:37 GMT In-Reply-To: <83a61tthu7.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Feb 2023 20:18:24 +0200") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:303016 Archived-At: Eli Zaretskii writes: >> From: Liliana Marie Prikler >> Cc: Andrea Corallo , Lars Ingebrigtsen ,=20 >> Stefan Monnier , Rob Browning >> >> Date: Sat, 04 Feb 2023 18:48:34 +0100 >>=20 >> Since I am on the Guix team for Emacs packaging, I'll try to lay out >> some concerns both from the perspective of a user and a downstream >> packager. I hope I'm not too late to the party. > > Thank you for your feedback. > >> > =C2=A0 . Do people actually use 'inhibit-automatic-native-compilation'= or >> > =C2=A0=C2=A0=C2=A0 the corresponding environment variable?=C2=A0 If so= , for what reasons, >> > =C2=A0=C2=A0=C2=A0 and why tweaking 'native-comp-eln-load-path' to dir= ect the *.eln >> > =C2=A0=C2=A0=C2=A0 files to some other place, including the temporary-= file >> > directory, >> > =C2=A0=C2=A0=C2=A0 was not enough? >> On Guix, I want my Emacs packages to either (1) already have been >> natively compiled when using `guix install some-emacs-package' or (2) >> to not natively compile anything and clutter my user-emacs-directory.=20 >> Now the concern about clutter is somewhat secondary to Emacs spending >> time that some other Emacs could have spent on CI. (We don't do native >> compilation on CI *yet*, but imho it would be worth doing for some >> packages) > > That's fine. Disabling native compilation will continue be supported, > of course, for any number of reasons. > >> > =C2=A0 . What do we want to do about compiling trampolines when >> > =C2=A0=C2=A0=C2=A0 native-compilation is disabled? >> In my opinion, there should be a way to generate these trampolines >> ahead of time in a known location (e.g. $package-trampolines.so) for >> the emacs package $package. If no such trampoline is found and native- >> compilation is disabled, no compilation should take place. > > Andrea, I think comp-compile-all-trampolines fits this bill? Yes I believe so. > That is, > if I load a package, then invoke that function, it will compile all > the trampolines that are not already compiled? Yes, it will compile all trampolines that are needed *and* are not found to be already compiled. If comp-compile-all-trampolines was used before all trampolines are already available and no trampoline compilation will be performed. >> > =C2=A0 . Do we want to keep the EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILA= TION >> > =C2=A0=C2=A0=C2=A0 environment variable? >> >=20 >> > =C2=A0=C2=A0=C2=A0 I dislike having environment variables that alter E= macs behavior, >> > =C2=A0=C2=A0=C2=A0 because environment variables are inherited by sub-= processes.=C2=A0 So >> > =C2=A0=C2=A0=C2=A0 having this variable set runs the risk of affecting= all the >> > =C2=A0=C2=A0=C2=A0 sub-processes, something that could be unexpected a= nd is not easy >> > =C2=A0=C2=A0=C2=A0 to prevent.=C2=A0 We had similar problems with EMAC= SLOADPATH, for >> > =C2=A0=C2=A0=C2=A0 example, which is especially painful when building = another >> > version >> > =C2=A0=C2=A0=C2=A0 of Emacs from a shell buffer inside Emacs.=C2=A0 Th= is causes some >> > =C2=A0=C2=A0=C2=A0 hard-to-debug problems. >> > =C2=A0=C2=A0=C2=A0 So if this environment variable is largely unused, = maybe we >> > should >> > =C2=A0=C2=A0=C2=A0 remove it, even if we keep 'inhibit-automatic-nativ= e- >> > compilation'. >> I don't think a variable is needed necessarily. What is needed is a >> method of enabling it reliably on the command line (i.e. a switch like >> --no-native-compilation would work, but so would --eval '(setq inhibit- >> automatic-native-compilation t)'), and reliably as a user editing just >> Emacs configuration files (in particular, early-init.el seems like the >> place I would naturally place it in). > > We already have (and will keep supporting) a way of disabling native > compilation, and/or the compilation of trampolines, via --eval. > > Thanks. > Andrea