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

From: Basil Contovounesios <[email-masked]>
Date: Sun, 07 May 2023 11:46:29 +0200

Eli Zaretskii [2023-05-06 16:23 +0300] wrote:

>> Cc: [email-masked], Philip Kaludercic <[email-masked]>
>> Date: Sat, 06 May 2023 15:10:23 +0200
>> From:  Basil Contovounesios via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>> 
>> Robert Pluim [2023-05-05 08:36 +0200] wrote:
>> 
>> > The file-missing error is expected, no? Thatʼs why the autoloads
>> > loading is wrapped in `with-demoted-errors'. Although if the message bothers
>> > you, I guess we could check `file-exists-p' for it.
>> 
>> I think it's problematic to emit even a demoted error for supported
>> circumstances, such as a 'library' package that defines no autoload
>> cookies.
>> 
>> Besides, shouldn't the autoloads file be generated unconditionally?
>> https://lists.gnu.org/r/emacs-devel/2022-06/msg00570.html
>> 
>> 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.

Contrast this with a package that defines even a single autoload cookie,
such as the bluetooth package on GNU ELPA.  In this case emacs-29 does
TRT:

-- 
Basil