Subject: Re: bug#64712: 29.0.92; Emacs 29 with native compilation compiles cl-loaddefs.el on every startup

From: Andrea Corallo <[email-masked]>
Date: Thu, 27 Jul 2023 05:56:51 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Andrea Corallo <[email-masked]>
>> Cc: Dmitry Gutov <[email-masked]>,  [email-masked],
>>   [email-masked]
>> Date: Thu, 27 Jul 2023 05:03:32 -0400
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > What do you suggest we do instead?  Emacs cannot know a file should
>> > not be compiled without reading its contents first.
>> 
>> If we add cl-loaddefs.el to `native-comp-jit-compilation-deny-list' we
>> should just not even attempt compiling it.
>> 
>> Dunno if it's considered an acceptable fix, in case I can push it so it
>> can get tested.
>
> I'm not sure.  This has a maintenance costs, since the specification
> is separate from the affected file.  If we ever decide to compile
> cl-loaddefs, someone might be in for a ride...

Yep totally agree, the only way I can think of in order to mitigate this
would be adding a comment in cl-loaddefs.el close to the
no-native-compile: t cookie.

  Andrea