From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Finalizing 'inhibit-automatic-native-compilation' Date: Sat, 04 Feb 2023 20:18:24 +0200 Message-ID: <83a61tthu7.fsf@gnu.org> References: <837cx8cey0.fsf@gnu.org> <440f4cbd46a2db3c9963bc32aba9abe6cbe108ea.camel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2156"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, akrl@sdf.org, larsi@gnus.org, monnier@iro.umontreal.ca, rlb@defaultvalue.org To: Liliana Marie Prikler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 04 19:18:59 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 1pON7p-0000Gk-4K for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Feb 2023 19:18:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pON7F-0005tV-M9; Sat, 04 Feb 2023 13:18:21 -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 1pON7E-0005tJ-2S for emacs-devel@gnu.org; Sat, 04 Feb 2023 13:18:20 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pON7C-0002rX-Iy; Sat, 04 Feb 2023 13:18:19 -0500 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=8/FiLY4lbDOzNryt0OT2YyTOtrZTMF8FBXJ7R+TN7F4=; b=gefKjz/MMqUk62Zbx3vR NdKq84UdIms+ElItx42gjeI1MFU0aF7Z51cVay3Rdpml0OUfkWLqOABoFQilRG3bflvBjgN3JhfP8 LLtpklJBSe5s9TRodcQaxuldL6/n01zrDMo0+hjEoytgAcrZBZvOBHdT9m1eLblo6ZkoKXTOG4Grt W5VfqAIRd24a7QMm8XA34drEuPbpBsFYhHz6Je858mSGI6rFtKJkpV+WUITaYYOcaBI+/UqYF8fbl U1rIgs6fSRxHvA3TDzAIL5/GjoXvNhY3HMnqh+G7t8bYVXCh3L/DG3Buz+vE2GPKqCBur5QYf8vjo +UJT7Y0fagE3iQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pON7B-00060a-QX; Sat, 04 Feb 2023 13:18:18 -0500 In-Reply-To: <440f4cbd46a2db3c9963bc32aba9abe6cbe108ea.camel@gmail.com> (message from Liliana Marie Prikler on Sat, 04 Feb 2023 18:48:34 +0100) 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:302973 Archived-At: > From: Liliana Marie Prikler > Cc: Andrea Corallo , Lars Ingebrigtsen , > Stefan Monnier , Rob Browning > > Date: Sat, 04 Feb 2023 18:48:34 +0100 > > 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. > >   . Do people actually use 'inhibit-automatic-native-compilation' or > >     the corresponding environment variable?  If so, for what reasons, > >     and why tweaking 'native-comp-eln-load-path' to direct the *.eln > >     files to some other place, including the temporary-file > > directory, > >     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. > 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. > >   . What do we want to do about compiling trampolines when > >     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? That is, if I load a package, then invoke that function, it will compile all the trampolines that are not already compiled? > >   . Do we want to keep the EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION > >     environment variable? > > > >     I dislike having environment variables that alter Emacs behavior, > >     because environment variables are inherited by sub-processes.  So > >     having this variable set runs the risk of affecting all the > >     sub-processes, something that could be unexpected and is not easy > >     to prevent.  We had similar problems with EMACSLOADPATH, for > >     example, which is especially painful when building another > > version > >     of Emacs from a shell buffer inside Emacs.  This causes some > >     hard-to-debug problems. > >     So if this environment variable is largely unused, maybe we > > should > >     remove it, even if we keep 'inhibit-automatic-native- > > 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.