unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Phil Sainty <psainty@orcon.net.nz>, 48025@debbugs.gnu.org
Subject: bug#48025: 28.0.50; Add an invocation option to inhibit native-compilation functionality
Date: Mon, 26 Apr 2021 14:10:23 +0000	[thread overview]
Message-ID: <xjfwnsp5e7k.fsf@sdf.org> (raw)
In-Reply-To: <83o8e1jlj4.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Apr 2021 15:08:31 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Phil Sainty <psainty@orcon.net.nz>
>> Date: Mon, 26 Apr 2021 17:52:52 +1200
>> Cc: Andrea Corallo <akrl@sdf.org>
>> 
>> Now that the native-compilation feature is merged, it would be very
>> useful to be able to build Emacs --with-native-compilation but be
>> able to choose to inhibit that functionality at start time via a
>> command-line option such as 'emacs --no-native-compilation', which
>> would cause Emacs to load/execute only .el and .elc files.
>> 
>> This will enable users to easily compare functionality with and
>> without native-compilation, so that native-compilation bugs can be
>> more easily identified and reproduced without requiring people to
>> maintain more than one build of Emacs in order to test how the
>> traditional interpreters behave.
>> 
>> I'm not sure if/how this ties in with the portable dumper.  Perhaps
>> there are .eln files included in the dump?  If so, perhaps the dump
>> would need to include both the .elc and the .eln code, and choose
>> which to use based on the new option.
>
> Andrea will correct me, but I think this is not trivial to implement,
> not even close.  Indeed, the contents of the pdumper file is different
> in the two cases, and I see no easy way of having both byte-compiled
> and native-compiled stuff live together in the same dump (they define
> the same functions, remember?).
>
> 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).
>
> 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.
>
> (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.  Andrea,
> am I missing something?)

No you are not, once we bootstrap and dump a native compiled Emacs
there's no way we can undone it and get the equivalent one with only
bytecode.

Other than I can mention some knobs we already have that might partially
help here:

- inibith the automatic native compilation of new code with
 `comp-deferred-compilation'.

- prevent .eln from being loaded in place of bytecode with
  `load-no-native'.

Thanks

  Andrea





  reply	other threads:[~2021-04-26 14:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26  5:52 bug#48025: 28.0.50; Add an invocation option to inhibit native-compilation functionality Phil Sainty
2021-04-26 12:08 ` Eli Zaretskii
2021-04-26 14:10   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-04-27  4:28     ` Phil Sainty
2021-04-27 13:34       ` Eli Zaretskii
2021-04-28 19:39         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-29 13:55           ` Eli Zaretskii
2021-04-29 14:33             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-29 15:05               ` Eli Zaretskii
2021-04-29 15:13                 ` Eli Zaretskii
2021-04-29 15:22                   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-29 15:45                     ` Eli Zaretskii
2021-05-06 15:19                       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-06 15:41                         ` Eli Zaretskii
2022-06-30 13:08 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xjfwnsp5e7k.fsf@sdf.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=48025@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    --cc=psainty@orcon.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).