GNU bug report logs -
#57929
29.0.50; package-quickstart.elc incompatible with Emacs 28.2 due to defvar-1
Previous Next
Full log
View this message in rfc822 format
Stefan Kangas [2022-09-19 05:56:39] wrote:
> It seems like the package-quickstart.elc is now backwards-incompatible
> since defvar-1 is missing.
Yes, same old issue of compatibility for `.elc` files.
It would be good to improve our handling of such situations (for
`package-quickstart.elc` as well as for other compiled files such as
those in ELPA packages).
I can think of two ways to detect the problem:
- When loading the `.elc` file signals an error.
[ It might be a legitimate error, but we could catch it and ask the
user if we should try loading the non-compiled file instead. ]
- When the loaded file's version marker is "too large". The 4th byte of
`.elc` files holds the major version of the Emacs that compiled it
(except that 29.0.xx counts as 28, see comment in bytecomp.el:2390),
so we could easily use this evidence that the file was compiled by
a newer Emacs to skip the .`elc` file.
Once detected we could also delete the file, or recompile it, or suggest
doing one of those. Deleting could throw away a handy file.
And recompiling may generate an invalid `.elc` file if some of the
dependencies defining macros aren't loaded (or may fail if some of the
required dependencies aren't in `load-path`).
Stefan
This bug report was last modified 2 years and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.