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 02:21:37 -0400 Message-ID: References: <8335hky5iv.fsf@gnu.org> <83zgjnpaby.fsf@gnu.org> Reply-To: rswgnu@gmail.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007ab4af05deca9376" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8232"; 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 08:27:58 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 1np2In-0001wm-Ah for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 08:27:57 +0200 Original-Received: from localhost ([::1]:48282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1np2Il-0007kZ-V2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 May 2022 02:27:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1np2E2-0003kT-Oj for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 02:23:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1np2E2-0003tY-Ef for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 02:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1np2E2-0008Jr-A7 for bug-gnu-emacs@gnu.org; Thu, 12 May 2022 02:23:02 -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 06:23:02 +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.165233654431904 (code B ref 55305); Thu, 12 May 2022 06:23:02 +0000 Original-Received: (at 55305) by debbugs.gnu.org; 12 May 2022 06:22:24 +0000 Original-Received: from localhost ([127.0.0.1]:39287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1np2DC-0008I7-Bd for submit@debbugs.gnu.org; Thu, 12 May 2022 02:22:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1np2DA-0008Hr-Jy for 55305@debbugs.gnu.org; Thu, 12 May 2022 02:22:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1np2D5-0003nv-Cr for 55305@debbugs.gnu.org; Thu, 12 May 2022 02:22:03 -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=L0Yh43xH2jIBgiixd02JPm97gFM0txSk9E6l6Y3pfOE=; b=doavipZYo26U /A7lrvrc/COtBR3p69YoGgQxDdUNQv6Q4YEpHbEtyEpn0tl1Cls9ia7Rw11hd1Iko/1FCzdm4a+Rf DV7Rw2AXdY+fUoWrviPkgdJWySMiD6E/RgmEr/qKg6cgA/UuaF6rVChvtUfLV9wiM8g4ANp+vM+gt aOYl7DYR3hqb742D5eKvAkbY3E624ZF+HpHCWEtXd9anTkfoAF+XNssKZbwm8W5QiJqb7zzi1xPOC yT9aiik8PekWVF3xu8R+hNdGg97Kba/fYurmPXmPcgBdxHJbsjYQ/U1f3yO8iXjikdlA1ifo+vAxT TBkZ7whirRzWHNkJ5oQhhA==; Original-Received: from mail-vk1-f179.google.com ([209.85.221.179]:33341) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1np2D5-0008Jq-7j for 55305@debbugs.gnu.org; Thu, 12 May 2022 02:22:03 -0400 Original-Received: by mail-vk1-f179.google.com with SMTP id d132so2204737vke.0 for <55305@debbugs.gnu.org>; Wed, 11 May 2022 23:22:03 -0700 (PDT) X-Gm-Message-State: AOAM532RIafzXjZwF1wfFce4mL8RxmXRgbokur145KSP0VmRFay3c3yS PiRntTodskoUJHaRfka5rR5U8IQ8tEDak21Pbhg= X-Google-Smtp-Source: ABdhPJxmHGR+HcVqu7fROzoKH93PqhFUhb1DhS5mzb51Zlx7BGrPyMduFxzXD+g/BqkKsNGLINjya8nn2Chqg5p7D/Q= X-Received: by 2002:ac5:cb64:0:b0:351:c285:68fa with SMTP id l4-20020ac5cb64000000b00351c28568famr15601872vkn.6.1652336522604; Wed, 11 May 2022 23:22:02 -0700 (PDT) In-Reply-To: <83zgjnpaby.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:232017 Archived-At: --0000000000007ab4af05deca9376 Content-Type: text/plain; charset="UTF-8" On Thu, May 12, 2022 at 1:51 AM Eli Zaretskii wrote: > > From: Robert Weiner > > Date: Thu, 12 May 2022 01:14:58 -0400 > > Cc: 55305@debbugs.gnu.org > > > > 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. > > Does this last fact mean there's an assumption in Hyperbole that the > package is always activated before its *.el files are compiled? If > so, perhaps this is why it fails during native-compilation, where the > package is not activated prior to the compilation? > Said another way, there is an assumption that the hyperbole-autoloads.el file is loaded prior to any compilation, yes. This is similar to assumptions that loaddefs.el are loaded prior to their reference in other Emacs Lisp files. The point of the autoloads file is to include definitions that must exist in the Lisp environment prior to their reference in any Lisp files, whether this is during package use or package build-time. > And why would such an assumption, if it exist, make sense? It seems > to me like the ability to compile a .el file should require activation > of any package, or what am I missing? > I am not saying that the package must be activated prior to compilation but just that there must be an additional hook provided that forces loading of the autoloads prior to any build/compilation of the package (whether byte compilation or native compilation). Otherwise the build process will generate errors because the autoload definitions will not exist, e.g. maybe an autoloaded variable meant to be global to the package is referenced at the top-level of a package Lisp file. Complex packages have complex dependencies that I would say cannot all be handled with requires; otherwise, there would be no need for the autoload mechanism. Or am I missing something? Bob --0000000000007ab4af05deca9376 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, May 12, 2022 at 1:51 AM Eli Zaretskii <eliz@gnu.org> wrote:
> F= rom: Robert Weiner <rsw= @gnu.org>
> Date: Thu, 12 May 2022 01:14:58 -0400
> Cc: 55305@d= ebbugs.gnu.org
>
>=C2=A0 Do the *.el files that produce the error 'require' or &#= 39;load'
>=C2=A0 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-stuf= f' function in "package.el").=C2=A0 The package
> manager also sets up at package activation time to have those autoload= s loaded prior to loading any other
> code from the Hyperbole package.

Does this last fact mean there's an assumption in Hyperbole that the package is always activated before its *.el files are compiled?=C2=A0 If so, perhaps this is why it fails during native-compilation, where the
package is not activated prior to the compilation?
Said another way, there is an assumption that the hyperbole-autoloads.el= file is loaded prior to any compilation, yes.=C2=A0 This is similar to ass= umptions that loaddefs.el are loaded prior to their reference in other Emac= s Lisp files.=C2=A0 The point of the autoloads file is to include definitio= ns that must exist in the Lisp environment prior to their reference in any = Lisp files, whether this is during package use or package build-time.
=

=

And why would such an assumption, if it exist, make sense?=C2=A0 It seems to me like the ability to compile a .el file should require activation
of any package, or what am I missing?

I am not s= aying that the package must be activated prior to compilation but just that= there must be an additional hook provided that forces loading of the autol= oads prior to any build/compilation of the package (whether byte compilatio= n or native compilation).=C2=A0 Otherwise the build process will generate e= rrors because the autoload definitions will not exist, e.g. maybe an autolo= aded variable meant to be global to the package is referenced at the top-le= vel of a package Lisp file.=C2=A0 Complex packages have complex dependencie= s that I would say cannot all be handled with requires; otherwise, there wo= uld be no need for the autoload mechanism.=C2=A0 Or am I missing something?=

Bob
--0000000000007ab4af05deca9376--