all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rsw@gnu.org, rswgnu@gmail.com, 55305@debbugs.gnu.org, akrl@sdf.org
Subject: bug#55305: 28.0.50: With async nativecomp, package manager fails to load hyperbole-autoloads.el before compilation
Date: Mon, 16 May 2022 12:40:41 -0400	[thread overview]
Message-ID: <jwvy1z1jvfx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8335hajjiy.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 16 May 2022 05:31:01 +0300")

Eli Zaretskii [2022-05-16 05:31:01] wrote:
> My worry is about packages that do NOT depend on such macros.  Calling
> package-activate-all will activate all the packages on the user's
> system, and there's no way of knowing what those packages do at
> activation time.  They can change variables, advise functions,
> redefine commands, etc.

Yup.   I agree it can be worrisome, but:
- Those packages are presumably already activated in the current session
  and hence similarly affected the generation of the `.elc` files if the
  `.elc` files were generated by `package-install`.
- Preserving the `load-path` like we already do also exposes similar
  problems (some files may shadow the ones we need).

> We have no idea what will be the state of the session after
> doing that.

After the files are compiled, the session is killed (we're talking about
an Emacs sub-process performing native compilation asynchronously), so
I don't think we need to worry too much about that.

>> I'm not claiming that calling `package-activate-all` is right for
>> reasons of principle.  We sadly never clearly defined what it is that
>> a package can count on.
> Then we should do that _before_ we propose solutions that rely on
> what's there, knowing that what's there was never intended to solve
> this particular issue.

I don't understand what you're saying, here.

There is a de-facto definition of what a package can count on (which is
that its autoloads file has been loaded), which has been used ever since
the inception of `package.el`.

We can't go back to a time before that.

I don't know enough of what you mean by "this particular issue" to judge
whether this design was made to solve this issue or not, but I do know
that the autoloads file is loaded on purpose before compiling the `.elc`
files so as to make it more convenient to write the code of a package,
just like we happily rely on `loaddefs.el` being loaded when working on
Emacs's bundled code.

> This cure is worse than the disease.

My proposed patch is not a cure.  The cure would be to compile from the
`.elc` file (since the root of the problem is that we need those
autoloads and the `load-path` to macroexpand the code, and the only
reason why the native-compiler needs to macroexpand the code is because
it (re)starts from the `.el` file instead of using the `.elc` file
where no macro-expansion need to take place).


        Stefan






  reply	other threads:[~2022-05-16 16:40 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
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy1z1jvfx.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=55305@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rsw@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.