Subject: Re: bug#78783: 30.1.50; AOT-compiling site-lisp during the Emacs build doesn't work

From: Eli Zaretskii <[email-masked]>
Date: Wed, 09 Jul 2025 16:53:48 +0300

> From: Spencer Baugh <[email-masked]>
> Date: Wed, 9 Jul 2025 09:17:41 -0400
> Cc: [email-masked], [email-masked], 
>  	app-emacs-dev <[email-masked]>
> 
>  > > The supported way of compiling site-lisp files is after they are
>  > > installed in site-lisp.
>  > 
>  > This makes it difficult to develop code that will be installed in
>  > site-lisp, because code which is not installed cannot be tested with the
>  > native-compilation that will be used when that code is actually
>  > installed.  Since there are sometimes bugs in packages when used with
>  > native compilation, it would be better to be able to run the code before
>  > it is installed with the same native-compilation artifacts that will be
>  > used when it is installed.
> 
>  Emacs 30 and later has the emacs-lisp-native-compile command, which
>  can be used to compile the file visited in the current buffer.  The
>  companion command emacs-lisp-native-compile-and-load will also load
>  the resulting .eln file.  I think these two commands can be used to
>  test the results of natively-compiling any Lisp file, anywhere.
> 
> Yes, but then those native compilation artifacts aren't the ones which will actually be used when Emacs is
> installed.  So there is the possibility of differences between them, which can cause bugs which aren't caught
> by testing only the uninstalled version.

Every file you install on the end-user machine is never the same as
the one you tested on your development machine.  And yet we don't say
they cannot be tested.

So I don't see the difference here, and don't understand why we are
splitting hair.  The problems you raise are barely tangible at best.