unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: ldefs-boot.el
Date: Fri, 12 Aug 2005 14:49:20 -0500 (CDT)	[thread overview]
Message-ID: <200508121949.j7CJnKG07646@raven.dms.auburn.edu> (raw)

I recently had to update ldefs-boot.el because a new autoload cookie
for a variable had been added.  The autoload made its way into
loaddefs.el but not into ldefs-boot.el.  The strange thing was that when
the autoload was needed and bootstrapping failed because it was not
available, loaddefs.el had already been regenerated and the variable
was already defined in it.  But apparently only ldefs-boot.el and not
the updated loaddefs.el had been loaded at that stage.

Is the moral of this story that each time that somebody adds a new
autoload that is necessary for compilation during bootstrapping (as
opposed to just an autoload that allows the user to call an
interactive function without having to load the file first), one has
to update ldefs-boot by overwriting it with a valid up to date copy of
loaddefs.el?  If so how many people are aware of this?

>From the Changelog, it appears that ldefs-boot.el had to be updated
four times for similar reasons.  But my guess is that in the vast
majority of cases, when people get an error message during bootstrap
saying that a variable or function is not defined, they just add a
require (or a defvar).  There is no telling how many unnecessary
require's have been added in the Emacs code because of this situation.

I am not very familiar at all with the bootstrapping process and the
various Makefile's, but I wonder whether there really is no better way
to handle this.  If not, we could see what could be done to make more
people who contribute to Emacs CVS aware of the ldefs-boot.el
situation; in particular, when it is necessary to update it and how it
should be done.  (I had to figure it out by doing a lot of grepping
through the Makefile's and through the emacs-devel archives.)

The comment in lisp/Makefile.in is less than self-explanatory:

# Build loaddefs.el to make sure it's up-to-date.  If it's not, that
# might lead to errors during the bootstrap because something fails to
# autoload as expected.  If there is no emacs binary, then we can't
# build autoloads yet.  In that case we have to use ldefs-boot.el;
# bootstrap should always work with ldefs-boot.el.

No, it does not always work.  (How could it?)  It only works if you
update ldefs-boot whenever needed.

Sincerely,

Luc.

 LocalWords:  Changelog defvar

             reply	other threads:[~2005-08-12 19:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 19:49 Luc Teirlinck [this message]
2005-08-13  1:10 ` ldefs-boot.el Thien-Thi Nguyen
2005-08-14  0:30   ` ldefs-boot.el Luc Teirlinck
2005-08-14  0:35   ` ldefs-boot.el Luc Teirlinck
2005-08-14  9:49     ` ldefs-boot.el Thien-Thi Nguyen
2005-08-13 14:40 ` ldefs-boot.el Richard M. Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200508121949.j7CJnKG07646@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).