unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: akrl@sdf.org, stefan@marxist.se, 48079@debbugs.gnu.org
Subject: bug#48079: Temporary files while building after native-comp merge
Date: Mon, 03 Jan 2022 19:14:17 +0200	[thread overview]
Message-ID: <83zgocbv2u.fsf@gnu.org> (raw)
In-Reply-To: <jwv35m5zpbp.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sun, 02 Jan 2022 18:38:41 -0500)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  stefan@marxist.se,  48079@debbugs.gnu.org
> Date: Sun, 02 Jan 2022 18:38:41 -0500
> 
> 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`.

Are you sure your description above is accurate?  We have a backtrace
in bug#48978 that shows when we create the .elcXXX temporary file.  My
reading of that backtrace is that it's the other way around:
native-compilation invokes byte-compile-file, which compiles the Lisp
into bytecode, creates the file with make-temp-file, and writes out
the bytecode.  It is true that we then defer renaming of the temporary
file in this case, but it looks like the "suspend later" idea might
not work?





  reply	other threads:[~2022-01-03 17:14 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
2022-01-03 17:14                     ` Eli Zaretskii [this message]
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=83zgocbv2u.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=48079@debbugs.gnu.org \
    --cc=akrl@sdf.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).