From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.bugs Subject: bug#55305: 28.0.50: With async nativecomp, package manager fails to load hyperbole-autoloads.el before compilation Date: Thu, 12 May 2022 01:14:58 -0400 Message-ID: References: <8335hky5iv.fsf@gnu.org> Reply-To: rswgnu@gmail.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000287c4b05dec9a5c1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21199"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55305@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 12 07:16:13 2022 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 1np1BL-0005NL-LW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 07:16:11 +0200 Original-Received: from localhost ([::1]:38766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1np1BK-0006XL-B6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 01:16:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1np1BC-0006Wv-20 for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 01:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1np1BB-0002dY-PT for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 01:16:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1np1BB-0006B9-KV for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 01:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Weiner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 May 2022 05:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55305-submit@debbugs.gnu.org id=B55305.165233253323704 (code B ref 55305); Thu, 12 May 2022 05:16:01 +0000 Original-Received: (at 55305) by debbugs.gnu.org; 12 May 2022 05:15:33 +0000 Original-Received: from localhost ([127.0.0.1]:39172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1np1Ai-0006AF-Lr for submit@debbugs.gnu.org; Thu, 12 May 2022 01:15:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1np1Ag-00069w-S4 for 55305@debbugs.gnu.org; Thu, 12 May 2022 01:15:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1np1Ab-0002Wn-M7 for 55305@debbugs.gnu.org; Thu, 12 May 2022 01:15:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=To:Subject:Date:From:In-Reply-To:References: MIME-Version; bh=xutqzU5ZR05ChkkxCxxgExJRdYYliKsNcvdAk4SsLuY=; b=Xx9rWuUgRroE 6HZJzFIDbB0Gz4CHEcDDodS2jfASgjiM5uj1DRoxdBHb1mc77moI6Kpz1IqQiTcZsxyfz111rliz6 F5HPR9n3eQvX7bOZArIrZdi+oH04thT/XtxG8YJ8URwXK2yoRpkX8Mh7UDDSnglDdiByTacrpAwrR r0hrSF4yR6pUBb27u5w/0lfK1kPLkjzRFUnO2G4ZfBIxoF1J7etU+n+T3ALeV4xl1NW3XYK3Z7UY8 CMiUzH2R2Z/C2ATKeiSvPmpE1CNkn5zX3luLPVOfvKq4jryY0gD4nGn0eXx0unx65Yt5cWS/4Qyws 6yUew9ZC65geBcSahT8dBw==; Original-Received: from mail-vk1-f169.google.com ([209.85.221.169]:42743) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1np1Aa-00037Q-R7 for 55305@debbugs.gnu.org; Thu, 12 May 2022 01:15:24 -0400 Original-Received: by mail-vk1-f169.google.com with SMTP id e144so2128499vke.9 for <55305@debbugs.gnu.org>; Wed, 11 May 2022 22:15:24 -0700 (PDT) X-Gm-Message-State: AOAM531mNkfxpPZsuI9MsD3g9v7QRgpL1DgxcVBWMMfnu+1qm6nNjGoD cnEJWgMObfKAJLuirertyhNrw355Uwxo/EEIzGI= X-Google-Smtp-Source: ABdhPJwyOB30yNLPoSbrMLELg9DhWVQiKrC7GY2T9NMwt0gsLgZ7iAqUEp6Bi+aqVggbELBxM6fFObNbqUlls+ynzDQ= X-Received: by 2002:a05:6122:a12:b0:351:c28f:674 with SMTP id 18-20020a0561220a1200b00351c28f0674mr15365990vkn.3.1652332524238; Wed, 11 May 2022 22:15:24 -0700 (PDT) In-Reply-To: <8335hky5iv.fsf@gnu.org> X-Gmail-Original-Message-ID: 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" Xref: news.gmane.io gmane.emacs.bugs:232011 Archived-At: --000000000000287c4b05dec9a5c1 Content-Type: text/plain; charset="UTF-8" On Sun, May 8, 2022 at 1:09 AM Eli Zaretskii wrote: > > From: Robert Weiner > > Date: Sat, 7 May 2022 16:05:17 -0400 > > > > Tested under Emacs 28.1 and a recent tip of the Emacs git repo for Emacs > > 29 with asynchronous native compilation enabled: > > > > M-x package-install RET hyperbole RET > > > > fails to load the hyperbole-autoloads.el file before the > > async native compiler and byte compiler produce these errors since > > the autoloaded var:append function is not defined: > > Hyperbole is not part of Emacs, so this problem should first be taken > up with the Hyperbole developers. > Hi Eli: Thanks for the response. Two initial points: 1. I am the lead Hyperbole developer, so I will discuss it with myself :-) 2. I long ago was told that Elpa packages are considered part of Emacs although they don't ship with it; this is why you see a number of Hyperbole issues brought up on this list. It would be good if you and other core Emacs developers all held the same yes/no opinion on this so others could follow whatever is decided. > > Warning (comp): ~/.emacs.d/elpa/hyperbole-8.0.0/hui-em-but.el: Error: > Symbol's function definition is void > > var:append Disable showing Disable logging > > Warning (comp): ~/.emacs.d/elpa/hyperbole-8.0.0/hui-mouse.el: Error: > Symbol's function definition is void > > var:append Disable showing Disable logging > > Warning (comp): ~/.emacs.d/elpa/hyperbole-8.0.0/hbut.el: Error: Symbol's > function definition is void > > var:append Disable showing Disable logging > > > > The package manager definitely generates hyperbole-autoloads.el at some > > point though I do not know if it is before these errors are produced. > > Do the *.el files that produce the error 'require' or 'load' > hyperbole-autoloads? No, the Emacs package manager installation process generates that file from the ;;;###autoload annotations in Hyperbole lisp files (see the 'package--make-autoloads-and-stuff' function in "package.el"). The package manager also sets up at package activation time to have those autoloads loaded prior to loading any other code from the Hyperbole package. It would not make sense to require hyperbole-autoloads in other Lisp files since that file does not exist when the package distribution is generated and cannot be referenced prior to making a release; it would also defeat the purpose of autoloads. > If not, how would compilation know to load that > file? Asynchronous native compilation runs in a separate pristine > Emacs session, so it needs every dependency explicitly spelled out, or > it will fail. > This is the issue that I am bringing up that I am surprised does not affect or has not been reported for other packages. There needs to be a persistent, cross-session Emacs hook that runs prior to native compilation of packages that loads the autoloads file for the package. > But again, I think this is a matter for the Hyperbole developers to > look into first. > I have resolved this for Hyperbole in an upcoming pre-release by moving a number of previously autoloaded definitions into a file that can be 'required' by each Hyperbole module instead. This was a good bit of work and does not address the more general problem. I hope you and others will consider this a bit more and look into how it can be resolved for the good of all packages, as it seems to be a disconnect between the Emacs package manager and the native compilation code. Best regards, Bob --000000000000287c4b05dec9a5c1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, May 8, 2022 at 1:09 AM Eli Zaretskii <eliz@gnu.org> wrote:
> Fr= om: Robert Weiner <rsw@= gnu.org>
> Date: Sat, 7 May 2022 16:05:17 -0400
>
> Tested under Emacs 28.1 and a recent tip of the Emacs git repo for Ema= cs
> 29 with asynchronous native compilation enabled:
>
> M-x package-install RET hyperbole RET
>
> fails to load the hyperbole-autoloads.el file before the
> async native compiler and byte compiler produce these errors since
> the autoloaded var:append function is not defined:

Hyperbole is not part of Emacs, so this problem should first be taken
up with the Hyperbole developers.

Hi Eli:
<= div class=3D"gmail_default" style=3D"font-family:monospace,monospace">
<= /div>
Thanks for the response.=C2=A0 Two initial points:

1. I am the le= ad Hyperbole developer, so I will discuss it with myself :-)

2. I lo= ng ago was=C2=A0told=C2=A0that Elpa packages are considered part of Emacs a= lthough they don't ship with it; this is why you see a number of Hyperb= ole issues brought up on this list.=C2=A0 It would be good if you and other= core Emacs developers all held the same yes/no opinion on this so others c= ould follow whatever is decided.


> Warning (comp): ~/.emacs.d/elpa/hyperbole-8.0.0/hui-em-but.el: Error: = Symbol's function definition is void
> var:append Disable showing Disable logging
> Warning (comp): ~/.emacs.d/elpa/hyperbole-8.0.0/hui-mouse.el: Error: S= ymbol's function definition is void
> var:append Disable showing Disable logging
> Warning (comp): ~/.emacs.d/elpa/hyperbole-8.0.0/hbut.el: Error: Symbol= 's function definition is void
> var:append Disable showing Disable logging
>
> The package manager definitely generates hyperbole-autoloads.el at som= e
> point though I do not know if it is before these errors are produced.<= br>
Do the *.el files that produce the error 'require' or 'load'= ;
hyperbole-autoloads?

No, the Emacs package manager i= nstallation process generates that file from the ;;;###autoload annotations= in Hyperbole lisp files (see the 'package--make-autoloads-and-stuff= 9; function in "package.el").=C2=A0 The package manager also sets= up at package=C2=A0activation time to have those autoloads loaded prior to= loading any other code from the Hyperbole package.=C2=A0 It would not make= sense to require hyperbole-autoloads in other Lisp files since that file d= oes=C2=A0not exist when the package distribution is generated and cannot be= referenced prior to making a release; it would also defeat the purpose of = autoloads.
=C2=A0 = If not, how would compilation know to load that
file?=C2=A0 Asynchronous native compilation runs in a separate pristine
Emacs session, so it needs every dependency explicitly spelled out, or
it will fail.

This is the issue that I am bringi= ng up that I am surprised does not affect or has not been reported for othe= r packages.=C2=A0 There needs to be a persistent, cross-session Emacs hook = that runs prior to native compilation of packages that loads the autoloads = file for the package.


But again, I think this is a matter for the Hyperbole developers to
look into first.

I have resolved this for Hyperb= ole in an upcoming pre-release by moving a number of previously autoloaded = definitions into a file that can be 'required' by each Hyperbole mo= dule instead.=C2=A0 This was a good bit of work and does not address the mo= re general problem.=C2=A0 I hope you and others will consider this a bit mo= re and look into how it can be resolved for the good of all packages, as it= seems to be a disconnect between the Emacs package manager and the native = compilation code.

Best regards,

Bob
--000000000000287c4b05dec9a5c1--