From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: master 1d4e903417: Speed up generation of loaddefs files Date: Sat, 11 Jun 2022 13:50:59 +0300 Message-ID: <87k09niics.fsf@tcd.ie> References: <165401335654.18632.7065125202296753443@vcs2.savannah.gnu.org> <20220531160918.DFB2FC009A8@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12532"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 11 13:46:12 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzzZE-00035e-GX for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Jun 2022 13:46:12 +0200 Original-Received: from localhost ([::1]:54788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzzZD-0002ND-6H for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Jun 2022 07:46:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzyhy-0001XD-N6 for emacs-devel@gnu.org; Sat, 11 Jun 2022 06:51:10 -0400 Original-Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:37464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzyhu-0000Os-Qy for emacs-devel@gnu.org; Sat, 11 Jun 2022 06:51:10 -0400 Original-Received: by mail-ej1-x631.google.com with SMTP id gl15so2449633ejb.4 for ; Sat, 11 Jun 2022 03:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=niTRF1g+Aq0G2Op+B313jIEZfI7YdkU9E1EpEu2cVvA=; b=dzrYn50BGbaLA5JNpsfHBhGU6hBG8oZSxIg1idtUf0wQxybSFiC4aEZTMhB5tjYE5M oojD2KyRusJFV6HI/AED9uWMozHOl6GIAfUebuvszg/IohVnVGrKm7Ksq2eYVv2VZlzm SjUCKxL5/NhwpbtQAe4d58OII6wi2j89eNH2gvqoJd3ZAK22wtwX3VY608kho42GpE7e KkdL9U7qcC//naxDk77yRXyyCgabaIQsRGzKYKqvI4OnlaXmwsFKNev0UGv2Dw7H8fH4 VLk3XXLYMV6RxwxJh5x5Eu8mNGIb3giE/nHWn1P6s8WM+impQGZcGJhZ55aryH/zpkxj TmaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=niTRF1g+Aq0G2Op+B313jIEZfI7YdkU9E1EpEu2cVvA=; b=xVD2Rp5jARKXFUVly2cesMk9B9PAKc7o+KoJln8WXqOILBebzzy9NVt5SH2jqRvyk1 dam23CZquMKYq6ttFx1S0D43P50t81gF2vu72mwjJwbehtAwpc2tfN7oMgo1fXvQySl6 GGMPtQSLkSeUup22vbr2M3YYpw5gmDswpwFZxMI3OD2XSL90ehYSCxjANDHIlc/DGI+m 3nGw9r63YqJuQuTllgbdo5IUsaUegAQGQqxJ9X1/KqKG1M7gRsGEqY08vmYx4/+2lcZ6 PByNWRaHbd5E0N5flhs7gc8JJ/8nY2c4xQo6XBhY+bR1HAHkcnZAp9Fske8ceAoWgzvC NWdA== X-Gm-Message-State: AOAM531+e2j15n3XqEySNqBmh/H3EM20Ddc0BRcXqGN7vZ0Myb71Zca1 FKZcFvlGGjVCD45qVIX6R2ErmwNcy7tVCQ== X-Google-Smtp-Source: ABdhPJw4S16nO4EgpoJmxe2QD645xBcHvua8PtiJAGbUV+25neJOnp6itimMsH0ZpKm7w6lgHDAY4Q== X-Received: by 2002:a17:907:7d8e:b0:711:cf4b:9c5 with SMTP id oz14-20020a1709077d8e00b00711cf4b09c5mr28289148ejc.637.1654944662319; Sat, 11 Jun 2022 03:51:02 -0700 (PDT) Original-Received: from localhost ([2a02:587:322b:6f5e:dc92:136a:a7c4:dc8c]) by smtp.gmail.com with ESMTPSA id h2-20020a1709067cc200b007030c97ae62sm855960ejp.191.2022.06.11.03.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jun 2022 03:51:01 -0700 (PDT) In-Reply-To: <20220531160918.DFB2FC009A8@vcs2.savannah.gnu.org> (Lars Ingebrigtsen's message of "Tue, 31 May 2022 12:09:18 -0400 (EDT)") Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=contovob@tcd.ie; helo=mail-ej1-x631.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URI_DOTEDU=1.246 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291030 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen [2022-05-31 12:09 -0400] wrote: > branch: master > commit 1d4e90341782030cc7d8c29c639450b079587908 > Author: Lars Ingebrigtsen > Commit: Lars Ingebrigtsen > > 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 --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=backtrace.txt Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "/tmp/tmp.6gK5WLWds9/.emacs.d/elpa/sicp-20200512.1137/sicp-autoloads") load("/tmp/tmp.6gK5WLWds9/.emacs.d/elpa/sicp-20200512.1137/sicp-autoloads" nil t) package-activate-1(#s(package-desc :name sicp :version (20200512 1137) :summary "Structure and Interpretation of Computer Programs in info format" :reqs nil :kind nil :archive nil :dir "/tmp/tmp.6gK5WLWds9/.emacs.d/elpa/sicp-20200512.1137" :extras ((:url . "https://mitpress.mit.edu/sicp") (:maintainer "Hal Abelson") (:authors ("Hal Abelson") ("Jerry Sussman") ("Julie Sussman")) (:commit . "4002d83083d520c6b5ede2df36cc2cee885d450a")) :signed nil) :reload :deps) package-unpack(#s(package-desc :name sicp :version (20200512 1137) :summary "Structure and Interpretation of Computer Programs in info format" :reqs nil :kind tar :archive "melpa" :dir nil :extras ((:commit . "4002d83083d520c6b5ede2df36cc2cee885d450a") (:authors ("Hal Abelson") ("Jerry Sussman") ("Julie Sussman")) (:maintainer "Hal Abelson") (:url . "https://mitpress.mit.edu/sicp")) :signed nil)) #f(compiled-function (&optional good-sigs) #)(nil) #f(compiled-function () #)() package--with-response-buffer-1("https://melpa.org/packages/" #f(compiled-function () #) :file "sicp-20200512.1137.tar.sig" :async nil :error-function #f(compiled-function () #) :noerror t) package--check-signature("https://melpa.org/packages/" "sicp-20200512.1137.tar" "sicp-20200512.1137/\0\0\0..." nil #f(compiled-function (&optional good-sigs) #)) #f(compiled-function () #)() package--with-response-buffer-1("https://melpa.org/packages/" #f(compiled-function () #) :file "sicp-20200512.1137.tar" :async nil :error-function #f(compiled-function () #) :noerror nil) package-install-from-archive(#s(package-desc :name sicp :version (20200512 1137) :summary "Structure and Interpretation of Computer Programs in info format" :reqs nil :kind tar :archive "melpa" :dir nil :extras ((:commit . "4002d83083d520c6b5ede2df36cc2cee885d450a") (:authors ("Hal Abelson") ("Jerry Sussman") ("Julie Sussman")) (:maintainer "Hal Abelson") (:url . "https://mitpress.mit.edu/sicp")) :signed nil)) mapc(package-install-from-archive (#s(package-desc :name sicp :version (20200512 1137) :summary "Structure and Interpretation of Computer Programs in info format" :reqs nil :kind tar :archive "melpa" :dir nil :extras ((:commit . "4002d83083d520c6b5ede2df36cc2cee885d450a") (:authors ("Hal Abelson") ("Jerry Sussman") ("Julie Sussman")) (:maintainer "Hal Abelson") (:url . "https://mitpress.mit.edu/sicp")) :signed nil))) package-download-transaction((#s(package-desc :name sicp :version (20200512 1137) :summary "Structure and Interpretation of Computer Programs in info format" :reqs nil :kind tar :archive "melpa" :dir nil :extras ((:commit . "4002d83083d520c6b5ede2df36cc2cee885d450a") (:authors ("Hal Abelson") ("Jerry Sussman") ("Julie Sussman")) (:maintainer "Hal Abelson") (:url . "https://mitpress.mit.edu/sicp")) :signed nil))) package-install(sicp nil) funcall-interactively(package-install sicp nil) call-interactively(package-install record nil) command-execute(package-install record) execute-extended-command(nil "package-install" "package-install") funcall-interactively(execute-extended-command nil "package-install" "package-install") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) --=-=-= Content-Type: text/plain 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)) --=-=-=--