unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Andrea Corallo <akrl@sdf.org>
Cc: Eli Zaretskii <eliz@gnu.org>, stefan@marxist.se, 48079@debbugs.gnu.org
Subject: bug#48079: Temporary files while building after native-comp merge
Date: Sun, 02 Jan 2022 18:38:41 -0500	[thread overview]
Message-ID: <jwv35m5zpbp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <xjftunpxuox.fsf@sdf.org> (Andrea Corallo's message of "Thu, 29 Apr 2021 10:15:58 +0000")

>> Btw, what is the reason that these temporary *.elc files live longer
>> with the native compilation?
>
> Yes, essentially just the fact that compilation takes longer.
>
> When we compile Emacs the makefile uses
> `batch-byte-native-compile-for-bootstrap' to produce both the .elc and
> the .eln.  As the eln is produced as side product of the .elc to have
> the makefile dependecy model work we can't rename the .elc before the
> .eln is also finished even if we could, otherwise in case of
> interruption we may have the .elc produced but not the .eln.

Hmm... IIUC the situation is the following:

In the plain old byte-compiler, these files are *very* short lived
because they're not created during the compilation itself but only at
the very end when we save the result to a file (and we just do it by
first saving to `foo.elcNNMMPP` and then renaming that to `foo.elc`).

Now with `batch-byte-native-compile-for-bootstrap` apparently we "suspend
the byte-compiler" right in the middle of this small time window, i.e. after
writing to `foo.elcNNMMPP` but before its renamed.  Then we call the
native compiler and only once the native compiler is done, we resume the
byte compilation which just renames the file and exits.

If that understanding is correct, then I think we may be able to fix the
problem by just changing the moment at which we suspend the byte-compiler:
suspend it *before* it writes to `foo.elcNNMMPP`.


        Stefan






  reply	other threads:[~2022-01-02 23:38 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 11:10 bug#48079: Temporary files while building after native-comp merge Stefan Kangas
2021-04-28 12:10 ` Eli Zaretskii
2021-04-28 12:30   ` Eli Zaretskii
2021-04-28 13:14     ` Stefan Kangas
2021-04-28 19:27       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-28 21:26         ` Stefan Kangas
2021-04-29  5:14           ` Eli Zaretskii
2021-04-29  8:19             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-29  9:20               ` Eli Zaretskii
2021-04-29 10:15                 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-02 23:38                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-01-03 17:14                     ` Eli Zaretskii
2022-01-06 16:10                       ` Andrea Corallo
2022-01-06 16:30                         ` Glenn Morris
2022-01-06 16:48                           ` Eli Zaretskii
2022-01-06 17:15                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-07 16:30                           ` Andrea Corallo
2022-01-14 15:58                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-29 11:22               ` Stefan Kangas
2021-04-29  8:18           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-02  8:09           ` Lars Ingebrigtsen
2021-05-02 10:12             ` Stefan Kangas
2021-05-02 10:18               ` Lars Ingebrigtsen
2021-05-02 21:36               ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-05  8:35               ` Lars Ingebrigtsen
2021-05-05 12:11                 ` Eli Zaretskii
2021-05-05 12:47                   ` Lars Ingebrigtsen
2021-05-05 14:01                     ` Eli Zaretskii
2021-05-05 14:24                       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-06  9:15                         ` Lars Ingebrigtsen
2021-05-06 10:12                           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-28 19:24     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-24 12:36 ` 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=jwv35m5zpbp.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=48079@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefan@marxist.se \
    /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).