Subject: bug#55305: 28.0.50: With async nativecomp, package manager fails to load hyperbole-autoloads.el before compilation

From: Stefan Monnier <[email-masked]>
Date: Mon, 16 May 2022 13:17:14 -0400

> Besides, as long as the *.elc files are produced by batch-compilation,
> this will not happen.

AFAIK `.elc` files generated by batch-compilation is the rule for
Emacs's bundled files but the exception for ELPA-installed packages.
[ Many packages fail to compile properly when compiled in a batch
  session ;-)  This has improved somewhat over the years, tho.  ]

>> - Preserving the `load-path` like we already do also exposes similar
>>   problems (some files may shadow the ones we need).
> The effect of load-path is a much smaller one,
> and not propagating load-path would cause much graver problems.

Agreed.

>> I don't understand what you're saying, here.
> I'm sating we should define what is it the package can count on before
> suggesting solutions based on lack of such a definition.

My solution is not based on lack of definition.  It's based on the
de-facto definition that's been in use for the last 10 years.

>> 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`.
> That's when the package is loaded, not when it's compiled.

No, I'm talking about the compilation of the package's `.el` files into
`.elc` files.

> I'm also okay with leaving this issue unsolved until such time as we
> have native compilation based on .elc files, and revisiting this then.

Might be a good motivation to get this `.elc` compilation sooner rather
than later.

        Stefan