From: Robert Weiner <rsw@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 55305@debbugs.gnu.org
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 [thread overview]
Message-ID: <CA+OMD9j2xDnm_RE7PRYobbRbdHYUh3BKhLQLHDUTAet7D==Vzw@mail.gmail.com> (raw)
In-Reply-To: <8335hky5iv.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 3492 bytes --]
On Sun, May 8, 2022 at 1:09 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: 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 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
[-- Attachment #2: Type: text/html, Size: 5861 bytes --]
next prev parent reply other threads:[~2022-05-12 5:14 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-07 20:05 bug#55305: 28.0.50: With async nativecomp, package manager fails to load hyperbole-autoloads.el before compilation Robert Weiner
2022-05-08 5:09 ` Eli Zaretskii
2022-05-12 5:14 ` Robert Weiner [this message]
2022-05-12 5:51 ` Eli Zaretskii
2022-05-12 6:21 ` Robert Weiner
2022-05-12 7:22 ` Eli Zaretskii
2022-05-14 14:47 ` Robert Weiner
2022-05-14 15:05 ` Eli Zaretskii
2022-05-14 22:40 ` Robert Weiner
2022-05-15 5:15 ` Eli Zaretskii
2022-05-15 15:59 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-15 16:17 ` Eli Zaretskii
2022-05-15 16:22 ` Eli Zaretskii
2022-05-15 16:47 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-15 17:01 ` Eli Zaretskii
2022-05-15 17:15 ` Eli Zaretskii
2022-05-15 20:12 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-16 2:31 ` Eli Zaretskii
2022-05-16 16:40 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-16 16:57 ` Eli Zaretskii
2022-05-16 17:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-15 20:39 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-16 2:33 ` Eli Zaretskii
2022-05-16 9:34 ` Andrea Corallo
2022-05-16 16:42 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-16 16:59 ` Eli Zaretskii
2022-05-16 22:27 ` Robert Weiner
2022-05-17 2:27 ` Eli Zaretskii
2023-06-07 21:36 ` Andrea Corallo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+OMD9j2xDnm_RE7PRYobbRbdHYUh3BKhLQLHDUTAet7D==Vzw@mail.gmail.com' \
--to=rsw@gnu.org \
--cc=55305@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rswgnu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).