emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 1d4e903417: Speed up generation of loaddefs files


From: Basil L. Contovounesios
Subject: Re: master 1d4e903417: Speed up generation of loaddefs files
Date: Sat, 11 Jun 2022 13:50:59 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen [2022-05-31 12:09 -0400] wrote:

> branch: master
> commit 1d4e90341782030cc7d8c29c639450b079587908
> Author: Lars Ingebrigtsen <larsi@gnus.org>
> Commit: Lars Ingebrigtsen <larsi@gnus.org>
>
>     Speed up generation of loaddefs files

[...]

>     * lisp/emacs-lisp/package.el: Use loaddefs-generate instead of
>     make-directory-autoloads.

[...]

> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index b340848a6f..48551f59b4 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -1003,6 +1003,7 @@ untar into a directory named DIR; otherwise, signal an 
> error."
>  
>  (defun package-autoload-ensure-default-file (file)
>    "Make sure that the autoload file FILE exists and if not create it."
> +  (declare (obsolete nil "29.1"))
>    (unless (file-exists-p file)
>      (require 'autoload)
>      (let ((coding-system-for-write 'utf-8-emacs-unix))
> @@ -1021,8 +1022,11 @@ untar into a directory named DIR; otherwise, signal an 
> error."
>           (autoload-timestamps nil)
>           (backup-inhibited t)
>           (version-control 'never))
> -    (package-autoload-ensure-default-file output-file)
> -    (make-directory-autoloads pkg-dir output-file)
> +    (loaddefs-generate
> +     pkg-dir output-file
> +     nil
> +     "(add-to-list 'load-path (directory-file-name
> +                         (or (file-name-directory #$) (car load-path))))")
>      (let ((buf (find-buffer-visiting output-file)))
>        (when buf (kill-buffer buf)))
>      auto-name))

Since this change, installation and activation of packages lacking
autoloads signals a (demoted) error.  For example:

$ cd "$(mktemp -d)"
$ export HOME="$PWD" XDG_CONFIG_HOME="$PWD/.config"
$ emacs -Q -f toggle-debug-on-error
(setq package-archives '(("melpa" . "https://melpa.org/packages/";)))
C-x C-e
M-x package-install RET sicp RET

Error loading autoloads:
(file-missing
 Cannot open load file
 No such file or directory
 /tmp/tmp.6gK5WLWds9/.emacs.d/elpa/sicp-20200512.1137/sicp-autoloads)

Backtrace attached.  The same error occurs with a subsequent:

C-x C-c
$ emacs -Q
M-x package-initialize RET

I guess either the -autoloads.el file should continue to be generated
unconditionally, or its nonexistence should not be regarded as an error.

Thanks,

-- 
Basil

Attachment: backtrace.txt
Description: Text document

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu)
 of 2022-06-11 built on tia
Repository revision: 1d4e90341782030cc7d8c29c639450b079587908
Repository branch: HEAD
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --prefix=/home/blc/.local --with-x-toolkit=no --without-x'

Configured features:
ACL DBUS GMP GNUTLS GPM JSON LCMS2 LIBSELINUX LIBSYSTEMD LIBXML2 MODULES
NOTIFY INOTIFY PDUMPER SECCOMP SOUND SQLITE3 THREADS XIM ZLIB

Important settings:
  value of $LANG: en_IE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug cl-extra help-fns cl-print debug
backtrace help-mode tool-bar find-func loaddefs-gen lisp-mnt radix-tree
tar-mode arc-mode archive-mode cus-edit pp wid-edit mm-archive message
sendmail yank-media dired dired-loaddefs rfc822 mml mml-sec epa derived
gnus-util text-property-search time-date mailabbrev gmm-utils mailheader
mm-decode mm-bodies mm-encode mail-utils gnutls network-stream url-http
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw
nsm rmc puny url-cache url-auth epg rfc6068 epg-config finder-inf
package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq cl-loaddefs cl-lib cus-start
cus-load term/xterm xterm gv subr-x byte-opt bytecomp byte-compile cconv
regexp-opt iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice simple cl-generic indonesian
philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese composite
emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help
abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face
macroexp files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 258881 11354)
 (symbols 48 15448 0)
 (strings 32 84223 1957)
 (string-bytes 1 3537351)
 (vectors 16 22445)
 (vector-slots 8 276160 19702)
 (floats 8 43 252)
 (intervals 56 795 162)
 (buffers 992 15))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]