GNU bug report logs -
#78783
30.1.50; AOT-compiling site-lisp during the Emacs build doesn't work
Previous Next
Full log
Message #25 received at 78783 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, Jul 9, 2025, 8:01 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Spencer Baugh <sbaugh <at> janestreet.com>
> > Cc: acorallo <at> gnu.org, 78783 <at> debbugs.gnu.org,
> app-emacs-dev <at> janestreet.com
> > Date: Tue, 08 Jul 2025 14:25:03 -0400
> >
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> > >> This is a general problem with AOT-compiling files which are
> > >> subsequently installed somewhere else. It applies both for core Emacs
> > >> files and for site-lisp.
> > >
> > > No, core Emacs files are okay and supported.
> > >
> > > It's compiling site-lisp files in this way is not supported. And you
> > > still haven't answered my question: why do you need that?
> > >
> > > 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.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.