From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Warning on files byte-compiled with different versions Date: Sun, 14 Feb 2016 16:02:29 +0100 Message-ID: <87a8n39vy2.fsf@linux-m68k.org> References: <87mvr7nxu4.fsf@russet.org.uk> <87pow2c956.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455462175 22170 80.91.229.3 (14 Feb 2016 15:02:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2016 15:02:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 14 16:02:48 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUyCG-0005xE-49 for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2016 16:02:48 +0100 Original-Received: from localhost ([::1]:51241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUyCC-0008Qw-9Q for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2016 10:02:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUyC8-0008OM-1D for emacs-devel@gnu.org; Sun, 14 Feb 2016 10:02:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUyC3-0007jz-24 for emacs-devel@gnu.org; Sun, 14 Feb 2016 10:02:39 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.9]:55954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUyC2-0007jo-Rj for emacs-devel@gnu.org; Sun, 14 Feb 2016 10:02:34 -0500 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3q3Bck5rTkz3hj77; Sun, 14 Feb 2016 16:02:30 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3q3Bck4DBvzvh1j; Sun, 14 Feb 2016 16:02:30 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id vn3kLgkZuV3b; Sun, 14 Feb 2016 16:02:29 +0100 (CET) X-Auth-Info: MWu9oPqJRqP4EyiqvJ5HPN6h2OzCi55ii1YuMKVDAnywKLlmjz7aZ7YX3xkkX5zK Original-Received: from igel.home (ppp-88-217-1-63.dynamic.mnet-online.de [88.217.1.63]) by mail.mnet-online.de (Postfix) with ESMTPA; Sun, 14 Feb 2016 16:02:29 +0100 (CET) Original-Received: by igel.home (Postfix, from userid 1000) id 1180E2C2CF3; Sun, 14 Feb 2016 16:02:29 +0100 (CET) X-Yow: I feel better about world problems now! In-Reply-To: (Stefan Monnier's message of "Sun, 14 Feb 2016 09:00:56 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 212.18.0.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199930 Archived-At: Stefan Monnier writes: >> So, the answer is no, AFAICT. Second question, is there any reason why >> this kind of functionality could not be added? > > Indeed. The byte-compiler could simply emit > > `(if (< emacs-major-version ,emacs-major-version) > (message "This file was compiled for a more recent Emacs")) > > at the beginning of every file. IIRC we used to do something like that. We have the bytecode version encoded in the header, and a check if it contains multi-byte characters. Just because the file was compiled by a later version should not be a reason to prevent loading it, only if the format itself changes. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."