From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39233: .elc file - possibly outdated backward compatibility comments Date: Fri, 24 Jan 2020 11:20:19 +0200 Message-ID: <835zh1rz1o.fsf@gnu.org> References: <87zhefkhi9.fsf@marxist.se> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="94091"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39233@debbugs.gnu.org, stefan@marxist.se To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 24 10:21:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iuv9R-000OR6-9W for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jan 2020 10:21:17 +0100 Original-Received: from localhost ([::1]:39090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuv9Q-0001ZR-E7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jan 2020 04:21:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58999) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuv9D-0001Y5-Ap for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 04:21:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuv9C-0006FL-7a for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 04:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47490) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iuv9C-0006Ef-3n for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 04:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iuv9B-0001bw-V2 for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2020 04:21:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jan 2020 09:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39233 X-GNU-PR-Package: emacs Original-Received: via spool by 39233-submit@debbugs.gnu.org id=B39233.15798576446160 (code B ref 39233); Fri, 24 Jan 2020 09:21:01 +0000 Original-Received: (at 39233) by debbugs.gnu.org; 24 Jan 2020 09:20:44 +0000 Original-Received: from localhost ([127.0.0.1]:53463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuv8u-0001bI-82 for submit@debbugs.gnu.org; Fri, 24 Jan 2020 04:20:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuv8s-0001b5-2I for 39233@debbugs.gnu.org; Fri, 24 Jan 2020 04:20:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iuv8m-0005Sl-FX; Fri, 24 Jan 2020 04:20:36 -0500 Original-Received: from [176.228.60.248] (port=3307 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iuv8l-0005h7-KR; Fri, 24 Jan 2020 04:20:36 -0500 In-reply-to: (message from Stefan Monnier on Thu, 23 Jan 2020 11:26:52 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175208 Archived-At: > From: Stefan Monnier > Date: Thu, 23 Jan 2020 11:26:52 -0500 > Cc: 39233@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.