bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48079: Temporary files while building after native-comp merge


From: Eli Zaretskii
Subject: bug#48079: Temporary files while building after native-comp merge
Date: Mon, 03 Jan 2022 19:14:17 +0200

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]