From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Basil Contovounesios via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63260: 29.0.90; Regression installing/activating packages without autoloads Date: Sat, 06 May 2023 15:10:23 +0200 Message-ID: <87a5yhtxkw.fsf@tcd.ie> References: <87ild8tnbg.fsf@tcd.ie> <87ttwsnn59.fsf@gmail.com> <87zg6kysao.fsf@tcd.ie> <87lei3nv24.fsf@gmail.com> Reply-To: Basil Contovounesios Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6418"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 63260@debbugs.gnu.org, Philip Kaludercic To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 06 15:11:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pvHgw-0001VP-Cn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 May 2023 15:11:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvHgn-0006zV-S5; Sat, 06 May 2023 09:11:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvHgk-0006zN-JV for bug-gnu-emacs@gnu.org; Sat, 06 May 2023 09:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvHgk-0002TS-A4 for bug-gnu-emacs@gnu.org; Sat, 06 May 2023 09:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvHgk-0007w1-0s for bug-gnu-emacs@gnu.org; Sat, 06 May 2023 09:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Basil Contovounesios Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 May 2023 13:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63260 X-GNU-PR-Package: emacs Original-Received: via spool by 63260-submit@debbugs.gnu.org id=B63260.168337863530463 (code B ref 63260); Sat, 06 May 2023 13:11:01 +0000 Original-Received: (at 63260) by debbugs.gnu.org; 6 May 2023 13:10:35 +0000 Original-Received: from localhost ([127.0.0.1]:59677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvHgJ-0007vG-5R for submit@debbugs.gnu.org; Sat, 06 May 2023 09:10:35 -0400 Original-Received: from mail-ed1-f68.google.com ([209.85.208.68]:51475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvHgG-0007uy-Ag for 63260@debbugs.gnu.org; Sat, 06 May 2023 09:10:33 -0400 Original-Received: by mail-ed1-f68.google.com with SMTP id 4fb4d7f45d1cf-50bceaf07b8so5386534a12.3 for <63260@debbugs.gnu.org>; Sat, 06 May 2023 06:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; t=1683378626; x=1685970626; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HT7/HVug8iAu4pXW8FQD85wHI2TDHDk5NCuYA8/CK7c=; b=UMltlKepGG9OSNRkzQVEts3ivIqSf+T/ECNkydZZdRanRXOEHYjJ4H9JHG9A0VDyag Ok5O1koiCHfmcGzYaaSz71tFWcSOfbGB7QSswVXmn6iY+c6KVx+ZA7lVL76XAMLob0Ze yXedi2b3xpESJLrFPnUrAB/Cf3rpMBuzPT4ZrNtRC5dvW4U2h7+yh8Yl1Uy2h2gNGjhT nJNYm1Op3M+jzCaW3FT/LB338pN9JWFtBPJneqBouglHFuKrHAMtl9Xx2cFnDlDDvXZB DOgyPLrP8sgci851Ayx435ZNVRIvVSyViVV8Nj93Rx4x/hcJnFkCDTe0FY9/8tpWnIEj UFYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683378626; x=1685970626; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=HT7/HVug8iAu4pXW8FQD85wHI2TDHDk5NCuYA8/CK7c=; b=Pcf00JJBHRuzOcNNJkN5Ixx9FHgFXveWN57T40qPz75J06hcSL/XmS49OxgUCBppGC mjUojMNS9hD908y3ExZO3q1SDtvfyPtDFWweq2/bJau1tH/jGbiwDFqn/820ESd+/qTD tC8w1r5HcZUrjTR6lqNLqkJ7JrRA8OVdclYd0qsmLaDj+22SjbR7nHfyNNo+/uEiTfo3 rEaJJUvZ5Qb5Bf/q4iIOGeGXeXcSgbQp34bQCTXta/rjc7g9NY7qXA/Mp7WmySrhItcl I0yWw+xzSjCdsC2beGK2/EVQPaK13oNXxDQ1OthpvOwuIqpFcK7UHr8WyQvPasRPoLQj lfnA== X-Gm-Message-State: AC+VfDye3Mlo/cbZA2ZwoWP5Q+LLqTgPOACDYnVFTLip1aeVl4K2RHmC 0uSZhAdSe+tlUbAhYtvsGzU3DA== X-Google-Smtp-Source: ACHHUZ7q7rWACOF8L3wufHiae5dMb9+VyOmLTFdCy1VeUnQVEaaGcZFAsCNSH45jSDMm0tG1hYt32A== X-Received: by 2002:a50:eb48:0:b0:50b:c479:fed7 with SMTP id z8-20020a50eb48000000b0050bc479fed7mr3834525edp.21.1683378626467; Sat, 06 May 2023 06:10:26 -0700 (PDT) Original-Received: from localhost ([146.70.196.229]) by smtp.gmail.com with ESMTPSA id a25-20020aa7d919000000b0050bc9ffed66sm4002196edr.53.2023.05.06.06.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 06:10:25 -0700 (PDT) In-Reply-To: <87lei3nv24.fsf@gmail.com> (Robert Pluim's message of "Fri, 05 May 2023 08:36:51 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261193 Archived-At: Robert Pluim [2023-05-05 08:36 +0200] wrote: >>>>>> On Thu, 04 May 2023 18:28:47 +0200, Basil Contovounesios said: > > Basil> This does not address the file-missing error during package ac= tivation, > Basil> but it allows a subsequent package-quickstart-refresh to compl= ete > Basil> (albeit with a warning in a *Compile-Log*): > > The file-missing error is expected, no? That=CA=BCs why the autoloads > loading is wrapped in `with-demoted-errors'. Although if the message both= ers > 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-quicksta= rt.el > Basil> at Thu May 4 18:24:07 2023 > Basil> Entering directory =E2=80=98/tmp/tmp.6cdF8paE0K/.emacs.d/=E2= =80=99 > 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=CA=BCd 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 ";; =C2=A1=C2=A1 This file is autogenerated by `package-qu= ickstart-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 fi= les). > + (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, --=20 Basil