GNU bug report logs - #39233
.elc file - possibly outdated backward compatibility comments

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Wed, 22 Jan 2020 08:45:02 UTC

Severity: minor

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 39233 <at> debbugs.gnu.org, stefan <at> marxist.se
Subject: bug#39233: .elc file - possibly outdated backward compatibility comments
Date: Fri, 24 Jan 2020 11:20:19 +0200
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Thu, 23 Jan 2020 11:26:52 -0500
> Cc: 39233 <at> debbugs.gnu.org
> 
> > In the .elc files on my machine, I see the following:
> >     ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
> 
> It's factually correct, but indeed it not really relevant, we can drop
> this to save some bytes.
> 
> >     ;;; This file does not contain utf-8 non-ASCII characters,
> >     ;;; and so can be loaded in Emacs versions earlier than 23.
> 
> Here, this is indeed likely not factually correct: some .elc files might
> indeed work in earlier versions, but that will depend on many other
> things:
> - byte codes have been added in Emacs-24 for the lexical-binding
>   support, others were added in Emacs-25, yet more in Emacs-26)
> - macros which expand to code which relies on functions/features only
>   provided in newer versions).
> - changes in the reader (e.g. the readable syntax for hash-tables, or
>   that of records).
> 
> I think more useful would be to emit a warning any time a .elc file is
> loaded into an Emacs that's older than the one with which it
> was compiled since that's a case we "don't support" (at least when the
> major-version is different).
> 
> > 1. Is it still correct that the byte compiled file can be loaded on
> >    Emacs 22?
> 
> It's quite likely that *some* do.  But I expect that the vast
> majority don't.
> 
> > 3. Following up on point 2, I also see:
> >    
> >        "\n;;; This file uses "
> >        (if dynamic-docstrings
> >            "dynamic docstrings, first added in Emacs 19.29"
> >          "opcodes that do not exist in Emacs 18")
> >    
> >    I'm not sure what to do here, but it doesn't seem to make sense to
> >    mention Emacs 18 in any case.  Of course, this file might use
> >    opcodes that do not exist in Emacs 23, or perhaps an even later
> >    version.
> 
> Throw it all away.

Will these changes still allow old Emacs binaries to load *.elc files
compiled by Emacs after these changes?  I hope we won't break that use
case.




This bug report was last modified 4 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.