unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* What does "Changing `byte-compile-dest-file'" mean?
@ 2022-02-22 20:22 Alan Mackenzie
  2022-02-22 21:13 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Mackenzie @ 2022-02-22 20:22 UTC (permalink / raw)
  To: emacs-devel

Hello, Emacs.

I'm trying to debug a failing bootstrap.  Central to the failure is the
error message:

    "Changing `byte-compile-dest-file' is obsolete (as of 23.2);
    set `byte-compile-dest-file-function' instead."

..  The error message comes from emacs-lisp/bytecomp.el L. 171.

But what does it mean?  In what respect is byte-compile-dest-file being
changed?  Is the message talking about the variable or the function of
that name?  (I'm guessing the function.)  Is the entity being altered in
some fashion, or is it getting replaced by something else?

What is causing the error?  It seems that if a function called
byte-compile-dest-file is already defined when bytecomp.el first gets
loaded, this triggers the error.  But what causes that circumstance?

There are no clues in the comments around that part of bytecomp.el.  Just
that it might have something to do with early versions of automake.
(Which we don't use, do we?)

Help!

Thanks in advance!

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What does "Changing `byte-compile-dest-file'" mean?
  2022-02-22 20:22 What does "Changing `byte-compile-dest-file'" mean? Alan Mackenzie
@ 2022-02-22 21:13 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2022-02-22 21:13 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> I'm trying to debug a failing bootstrap.  Central to the failure is the
> error message:
>
>     "Changing `byte-compile-dest-file' is obsolete (as of 23.2);
>     set `byte-compile-dest-file-function' instead."
>
> ..  The error message comes from emacs-lisp/bytecomp.el L. 171.

Hmmm... my crystal ball suggests that your bootstrap ends up loading
`bytecomp` recursively, i.e. a first load of `bytecomp` defines
`byte-compile-dest-file` and then before reaching the end of the file,
it recursive tries to load `bytecomp`, causing the warning to be emitted
(because the function is already defined by (featurep 'bytecomp) is
still nil).

> But what does it mean?  In what respect is byte-compile-dest-file being
> changed?

It's about to be redefined by the subsequent `defun`.  That function
used to be considered as something that tools/users were allowed to
redefine locally in order to save .elc files elsewhere than their
standard location.  This practice was made obsolete by introducing
`byte-compile-dest-file-function` instead.

The warning you're seeing should arguably be removed now.
Tho I don't know if it will solve your underlying problem.

> Just that it might have something to do with early versions of
> automake.  (Which we don't use, do we?)

Not anymore, no, indeed.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-22 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 20:22 What does "Changing `byte-compile-dest-file'" mean? Alan Mackenzie
2022-02-22 21:13 ` Stefan Monnier

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).