[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Docstring hack

From: Stefan Monnier
Subject: Re: Docstring hack
Date: Sun, 31 Jul 2022 17:32:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> mode, then that is overkill.  I don't understand why the docstrings are
> even being extracted for the byte compiled files at all, since they would
> be lazy loaded anyway.  Then you could remove the files from lisp.mk from
> the dependencies of DOC in the Makefile and just leave loaddefs and the
> docstrings from C source files.

That's indeed what we in Emacs-29.

> This is the conundrum of trying to do anything significant in site-load
> without Makefile support.  If you're bootstrapping, then none of those
> files are compiled.  So I put in a check to only load after the bootstrap
> during the dump. But nothing is byte compiled at this point other than the
> files in loadup.  Trying to do the byte compile from within site-load after
> the bootstrap but during the dump requires pre loading the source of all
> dependencies, because require and autoload hit the panic button in dump
> mode.

Loading `site-load.el` in the first dump is a bad idea because files
haven't been compiled yet.

Loading `site-load.el` in the second dump is a bad idea because:
- as currently written, the site-loaded files aren't compiled, so it's
  too early to dump them.
- if you change the build to byte-compile them before the second dump,
  you'll be byte-compiling them with the bootstrap-emacs which might
  work but will lead to a slower compilation.

So, I suggest something like:

    mv lisp/site-load.el lisp/my-site-load.el
    rm src/emacs
    mv lisp/my-site-load.el  lisp/site-load.el
    mv lisp/my-site-load.elc lisp/site-load.elc

So the first 2 dumps are "normal" without any site-loaded files, and
that's followed by a 3rd dump, where all the ELisp files are already


reply via email to

[Prev in Thread] Current Thread [Next in Thread]