From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#39233: .elc file - possibly outdated backward compatibility comments Date: Thu, 23 Jan 2020 11:26:52 -0500 Message-ID: References: <87zhefkhi9.fsf@marxist.se> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="118091"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 39233@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 23 19:16:39 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 1iuh1y-000Ugi-WA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jan 2020 19:16:38 +0100 Original-Received: from localhost ([::1]:34514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuh1x-0005pK-3K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jan 2020 13:16:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35063) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iufKt-0005rX-PI for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 11:28:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iufKs-0001EW-Kc for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 11:28:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iufKs-0001D3-E2 for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 11:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iufKs-0004oO-7I for bug-gnu-emacs@gnu.org; Thu, 23 Jan 2020 11:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jan 2020 16:28:02 +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.157979682418424 (code B ref 39233); Thu, 23 Jan 2020 16:28:02 +0000 Original-Received: (at 39233) by debbugs.gnu.org; 23 Jan 2020 16:27:04 +0000 Original-Received: from localhost ([127.0.0.1]:53094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iufJw-0004n6-JS for submit@debbugs.gnu.org; Thu, 23 Jan 2020 11:27:04 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iufJu-0004mc-7f for 39233@debbugs.gnu.org; Thu, 23 Jan 2020 11:27:03 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 729CA100DE9; Thu, 23 Jan 2020 11:26:56 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AA8EF10028B; Thu, 23 Jan 2020 11:26:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1579796814; bh=xG+pZ3volzHYccLqrj9shurck53erkYKsLHAn+TL+Nw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Mf86w3ArDzUibSNdH2yBAyhsiuKhfbMatvSXw9mHO5k5Msd6bQLovE/XWFEC7kYXQ nNm46wlEvwh8tPJCr5yGTreCaK0Ky8ATJe2SrvsqjmSTvKG8y0/bl4G1riTLJsenLC DMBRL2/SO+O777i0c394gRa9AgQAgXOCJoY7WCWL7AQy6ut+J/3gGM8Ju1yUg7yFLy zOxpvj5XQ009kpOlSNgzAAgR7lV7WgbBL4xo3DFON94GJeJnQlf1YHrP1rNJDw/nM4 AiPfM1A+xtLVckPHuE6wGbxJ0wMbvNhSwLfyYVvhoB7aptY6h2VA5/AQ/oeSzBDNmB GYbj0ZVXsgn2g== Original-Received: from pastel (69-196-141-61.dsl.teksavvy.com [69.196.141.61]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 745BC120C66; Thu, 23 Jan 2020 11:26:54 -0500 (EST) In-Reply-To: <87zhefkhi9.fsf@marxist.se> (Stefan Kangas's message of "Wed, 22 Jan 2020 09:44:14 +0100") 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:175175 Archived-At: > 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. Stefan