GNU bug report logs -
#63260
29.0.90; Regression installing/activating packages without autoloads
Previous Next
Reported by: Basil Contovounesios <contovob <at> tcd.ie>
Date: Thu, 4 May 2023 10:16:02 UTC
Severity: normal
Merged with 63298
Found in version 29.0.90
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 63260 <at> debbugs.gnu.org (full text, mbox):
Robert Pluim [2023-05-05 08:36 +0200] wrote:
>>>>>> On Thu, 04 May 2023 18:28:47 +0200, Basil Contovounesios <contovob <at> tcd.ie> said:
>
> Basil> This does not address the file-missing error during package activation,
> Basil> but it allows a subsequent package-quickstart-refresh to complete
> Basil> (albeit with a warning in a *Compile-Log*):
>
> 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.
> Basil> Compiling file /tmp/tmp.6cdF8paE0K/.emacs.d/package-quickstart.el
> Basil> at Thu May 4 18:24:07 2023
> Basil> Entering directory ‘/tmp/tmp.6cdF8paE0K/.emacs.d/’
> Basil> package-quickstart.el:4:2: Warning: Empty let body
>
> Basil> due to the following generated contents of package-quickstart-file:
>
> Basil> (let ((load-true-file-name nil)(load-file-name nil))
> Basil> )
>
> Iʼd claim ENOCOFFEE for the last patch, but it was not the morning :-)
If only POSIX made it clear to expect ENOCOFFEE when it's least
expected ;).
> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index 0919ce34448..4b488281b78 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -4491,11 +4491,11 @@ package-quickstart-refresh
> (insert ";;; Quickstart file to activate all packages at startup -*- lexical-binding:t -*-\n")
> (insert ";; ¡¡ This file is autogenerated by `package-quickstart-refresh', DO NOT EDIT !!\n\n")
> (dolist (pkg package--quickstart-pkgs)
> - (let* ((file
> - ;; Prefer uncompiled files (and don't accept .so files).
> - (let ((load-suffixes '(".el" ".elc")))
> - (locate-library (package--autoloads-file-name pkg))))
> - (pfile (prin1-to-string file)))
> + (when-let* ((file
> + ;; Prefer uncompiled files (and don't accept .so files).
> + (let ((load-suffixes '(".el" ".elc")))
> + (locate-library (package--autoloads-file-name pkg))))
> + (pfile (prin1-to-string file)))
> (insert "(let ((load-true-file-name " pfile ")\
> \(load-file-name " pfile "))\n")
> (insert-file-contents file)
This indeed avoids the problem in package-quickstart, thanks.
The issue with the missing autoload file during package
installation/activation remains, however.
Sorry for not being more helpful, but I'm travelling until next week.
Thanks,
--
Basil
This bug report was last modified 2 years and 15 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.