Subject: Re: bug#73303: 30.0.91; Native compiler repeatedly interrupts at random moments

From: Philip Kaludercic <[email-masked]>
Date: Tue, 17 Sep 2024 20:10:23 +0000

"N. Jackson" <[email-masked]> writes:

> At 18:46 +0000 on Tuesday 2024-09-17, Philip Kaludercic wrote:
>
>> Eli Zaretskii <[email-masked]> writes:
>>
>>>> 2. When the package system installs/updates a package, does it
>>>> natively compile the files at the same time as it byte compiles
>>>> them?
>>>
>>> I'm not sure, but I think it doesn't.  Philip, can you answer that?
>>
>> My understanding: Native compilation build on byte-compilation,
>> and all packages are byte-compiled.  If `package-native-compile'
>> is enabled (which is not the case by default), then the package is
>> immediately compiled using native-compilation as well.  This
>> applies both to installing packages and upgrading them.
>
> Shouldn't this be on by default now that native compilation is
> enabled by default?  After all, if Emacs is going to be byte
> compiling the files anyway, it might as well native compile them at
> the same time and get any issues out of the way while the user's
> mind is in working-with-packages mode.

I have no opinion on this, and as I don't build Emacs with native
compilation I cannot try it out either.

>> I don't know if the native compiler will detect .elc files
>> automatically and compile them at some later point.
>
> When they are loaded, presumably?

Right, Eli confirms this below.

Eli Zaretskii <[email-masked]> writes:

>> From: Philip Kaludercic <[email-masked]>
>> Cc: "N. Jackson" <[email-masked]>,  [email-masked],
>>   [email-masked]
>> Date: Tue, 17 Sep 2024 18:46:10 +0000
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> >> 2. When the package system installs/updates a package, does it
>> >> natively compile the files at the same time as it byte compiles
>> >> them?
>> >
>> > I'm not sure, but I think it doesn't.  Philip, can you answer that?
>> 
>> My understanding: Native compilation build on byte-compilation, and all
>> packages are byte-compiled.  If `package-native-compile' is enabled
>> (which is not the case by default), then the package is immediately
>> compiled using native-compilation as well.
>
> OK, so this means the OP will have to enable native compilation by
> customizing package-native-compile.

I haven't read through the entire thread, but it sounds like a possible
solution.

>> I don't know if the native compiler will detect .elc files
>> automatically and compile them at some later point.
>
> It will, but only when Emacs loads these .elc files.

-- 
	Philip Kaludercic on siskin