From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#48025: 28.0.50; Add an invocation option to inhibit native-compilation functionality Date: Tue, 27 Apr 2021 16:28:24 +1200 Message-ID: <99e449c1-c40c-d83f-701e-9648f788f4e3@orcon.net.nz> References: <421d2e18-e74c-8e0c-6a49-b6e23376eb14@orcon.net.nz> <83o8e1jlj4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2840"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 48025@debbugs.gnu.org To: Andrea Corallo , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 27 06:29:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbFLR-0000cA-QH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 06:29:09 +0200 Original-Received: from localhost ([::1]:55536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbFLQ-0002bT-PV for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 00:29:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbFLK-0002bI-HZ for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 00:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbFLK-0001da-AV for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 00:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbFLK-0006j1-6d for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 00:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2021 04:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48025 X-GNU-PR-Package: emacs Original-Received: via spool by 48025-submit@debbugs.gnu.org id=B48025.161949771125810 (code B ref 48025); Tue, 27 Apr 2021 04:29:02 +0000 Original-Received: (at 48025) by debbugs.gnu.org; 27 Apr 2021 04:28:31 +0000 Original-Received: from localhost ([127.0.0.1]:47729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbFKo-0006iE-WD for submit@debbugs.gnu.org; Tue, 27 Apr 2021 00:28:31 -0400 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:39927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbFKm-0006i3-M7 for 48025@debbugs.gnu.org; Tue, 27 Apr 2021 00:28:29 -0400 Original-Received: from [101.53.216.162] (port=35234 helo=[192.168.20.103]) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1lbFKi-0000qB-L6; Tue, 27 Apr 2021 16:28:25 +1200 In-Reply-To: Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:204997 Archived-At: > Eli Zaretskii writes: >> We could perhaps provide a special value of --temacs= switch to >> temacs, so that the same temacs executable could be dumped into 2 >> different *.pdmp files, one with natively-compiled preloaded stuff, >> the other with byte-compiled stuff; then users could use the existing >> option --dump-file= to start Emacs with the non-standard pdumper file >> (they will also need to set comp-deferred-compilation to nil to >> prevent any run-time native-compilations once Emacs starts). That sounds like a good solution (and maybe one which could be wrapped up under a new option, if the --with-native-compilation build process automatically generated both *.pdmp files, and Emacs knows what they both are). >> But frankly, I would hesitate to complicate Emacs even for the latter >> possibility. What you ask for doesn't seem to be a user-level >> feature, it is mainly important for Emacs developers, and those can >> always build 2 separate binaries (e.g., I already did). Building a >> differently-configured Emacs, even from the same Git repository, is so >> easy that I don't really see a justification for a feature like you >> describe. I guess time will tell. My feeling was that if end users encounter native-comp bugs that are not trivial for the maintainers to reproduce (e.g. some collection of third-party packages is involved), then it might be super helpful to be able to ask them to test with native-comp disabled, to confirm whether or not that is a factor. As many users will, in future, be running a native-comp Emacs which has been pre- packaged for their OS, they will not easily be able to perform such a test without such a feature. It would definitely be a "nice to have". However as it's evidentially non-trivial to support this feature, I don't know whether the effort would actually prove worthwhile. >> (As for reproducing problems easily: it isn't hard to run the >> interpreted or byte-compiled Lisp, if you can identify the relevant >> Lisp files involved in the problem: just load them manually. I did think of that, but my feeling was that it's just not the same thing as inhibiting the native-compilation entirely. But as an existing alternative which would probably do the job in most cases, it's hard to argue with. On 27/04/21 2:10 am, Andrea Corallo wrote: > Other than I can mention some knobs we already have that might partially > help here: > > - prevent .eln from being loaded in place of bytecode with > `load-no-native'. Yes, that's good to know about. I see now that "apropos-variable native" is very useful (my bad for not thinking of that earlier). That var should definitely be noted in the manual once we have some in- built docs for this; but in the meantime it might be very helpful to update https://akrl.sdf.org/gccemacs.html with a collection of the ways that users can tweak/test this feature? > - inhibit the automatic native compilation of new code with > `comp-deferred-compilation'. This, OTOH, doesn't use the "native" keyword at all. Could we rename any such variables so that everything to do with native compilation includes the word "native"? That's a dramatically more specific term than "compilation", so it would seem good if it was an easy way to find/identify the native-comp options. -Phil