Subject: Re: bug#63260: 29.0.90; Regression installing/activating packages without autoloads

From: Philip Kaludercic <[email-masked]>
Date: Sun, 07 May 2023 12:39:48 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Basil Contovounesios <[email-masked]>
>> Cc: [email-masked],  [email-masked],  [email-masked]
>> Date: Sun, 07 May 2023 11:46:29 +0200
>> 
>> >> While the error logged to *Messages* is relatively silent, its subequent
>> >> repetition on Emacs startup is not:
>> >> 
>> >> $ emacs-29
>> >> Error loading autoloads: (file-missing Cannot open load file
>> >> No such file or directory
>> >> /tmp/tmp.QQvQfBZ384/.emacs.d/elpa/sicp-20200512.1137/sicp-autoloads)
>> >> 
>> >> This does not seem like TRT to me.
>> >
>> > What happened in Emacs 28 in the same situation?
>> 
>> Emacs 28.2 installs and activates the sicp package without complaints,
>> and generates the following -autoloads.el file, as expected:
>> 
>> 
>> The current emacs-29 generates no such autoloads file, because the sicp
>> package defines no autoloads.  But in general the -autoloads.el file is
>> nevertheless needed, at least for its load-path logic.
>
> AFAIU, in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62734 I asked
> Philip what would happen in this case, and he replied that the changes
> he proposed did TRT in that case?  So what is different here?  Philip?

No, that appears to have been my mistake.  The issue is that
`loaddefs-generate' generates the autoload file while looping over all
definitions to autoload, but if there are no files, Basil is right that
nothing happens.  This is fine in general, but `loaddefs-generate' has
the extra task of modifying load-path (which has been the root of the
issue in bug#62734).  Perhaps it is best to revert the commit, and come
up with a alternative solution.  I have an idea, but I'll have to test
it again before I forget something like this.

-- 
Philip Kaludercic