From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: Compiled code in Emacs-26 will fail in Emacs-25 if use pcase [was: Add new bytecode op `switch' for implementing branch tables.] Date: Thu, 23 Feb 2017 14:33:42 +0000 Message-ID: References: <1b07c68a-873e-83c8-246d-423bc83a3881@gmail.com> <83y3xg4ldw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c1909e2a4b194054933809a X-Trace: blaine.gmane.org 1487860446 7429 195.159.176.226 (23 Feb 2017 14:34:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Feb 2017 14:34:06 +0000 (UTC) Cc: cpitclaudel@gmail.com, Eli Zaretskii , Vibhav Pant , Emacs developers To: Stefan Monnier , Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 23 15:34:02 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cguT3-0001Tn-BC for ged-emacs-devel@m.gmane.org; Thu, 23 Feb 2017 15:34:01 +0100 Original-Received: from localhost ([::1]:59052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cguT8-0007al-W9 for ged-emacs-devel@m.gmane.org; Thu, 23 Feb 2017 09:34:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cguT2-0007ab-H4 for emacs-devel@gnu.org; Thu, 23 Feb 2017 09:34:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cguT0-0000Ij-Tw for emacs-devel@gnu.org; Thu, 23 Feb 2017 09:34:00 -0500 Original-Received: from mail-ua0-x234.google.com ([2607:f8b0:400c:c08::234]:36816) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cguSz-0000Hm-48; Thu, 23 Feb 2017 09:33:57 -0500 Original-Received: by mail-ua0-x234.google.com with SMTP id g30so22704224uac.3; Thu, 23 Feb 2017 06:33:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jLi7EradBtRCz+V5xULzVpHx4KHg382w3fu5ijLKcs4=; b=gTHw8JRdz/TpsyySH8fTbJhr1N5GuAojtB4CObnKaN2P0d7M/f23aoC3aaYrWQ6SQY 2Q2Xm0GHOHStZXQ+Tk5gkqpW6eOvyjq6/BsBjnfs6pA0M3cHDXEcYK7YiXMAh9hi7em7 UmhAAudxEmMrQPPySY7ccZUoo8d2JAAoJbkJ8HBqcnh6ZHzjEbcvmts9dhyJ2FZsak6C eFe2iP/5hexF7uaLLjau5gaD4UZQeNHXJysgyElBgYQn4qBvBvSZ975S9qzCaLRkGTzh YM2fy8cuVwE64Ci1uvFfxTjBbA4VXmdl1PR+VmkOjySFx4EBE1nqXdiKzaUTDJ5lEANG +BAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jLi7EradBtRCz+V5xULzVpHx4KHg382w3fu5ijLKcs4=; b=ggdxUvVLhWPB9nraVP2vzEP4Gz/C55BDYEjTFNlxG6N3tiUnycLze5p6dwsqygRUPL fExpOLitgw9uoGk0rynp9Tjcz1nY0btLBz77EuzRJ9BXUWGHvun2mAsQyAtqcAeoDHHn ihfgXz4qY1QMHsjZCHLtifpX78IcBUhoTk7hr6KREkI6LWGdhTF9gZi+ryZPdRkcYoJo GbVdwXtmZBbb3ouplYN1saDkpTk+sbERY742Fbvb9JWqhdVX9azgFchF3YR46HMnmAVM IRM47VKONSG9PY7o8524R+89B4t0L8uSh73TkJYRKpAl7i6oh+/a06cvR1SKcX9l9yeQ egDA== X-Gm-Message-State: AMke39l/0qrnx3udT5yiJAuAPHhvDQx+NgvEX5nFEYwJ/tRQek8o1sBPrvmFZ8LzK2YOwlDn8ZLl2/EqL77Jpw== X-Received: by 10.176.82.86 with SMTP id j22mr8515123uaa.126.1487860433988; Thu, 23 Feb 2017 06:33:53 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c08::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212545 Archived-At: --94eb2c1909e2a4b194054933809a Content-Type: text/plain; charset=UTF-8 I have this in my emacs config for a while now. It works pretty well. It also allows you to use an older emacs version without have to mess up the compiled elpa dir of the current version. The only side-effect is that when switching major versions the package updates/installs will happen independently. (setq package-user-dir (format "%selpa_%s/" user-emacs-directory emacs-major-version)) On Thu, Feb 23, 2017 at 8:42 AM Stefan Monnier wrote: > > I) Compile under master branch. > > II) Load the resultant .elc with Emacs-25 > > As explained by Richard, this is usually considered acceptable. > We don't really try to provide forward compatibility of byte-code files > between major versions. > > This said, occasionally we try to reduce the pain a little: e.g. in > Emacs-25 a similar incompatibility was introduced for the compilation of > catch&condition-case, but the bytecodes were introduced a bit earlier. > IOW the incompatibility was fundamentally introduced in 24.4 (IIRC), but > the use of the this new feature was only enabled in Emacs-25.1, so files > compiled with 25.1 will usually work in 24.5 as well. > > > Stefan > > -- Kaushal Modi --94eb2c1909e2a4b194054933809a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have this in my emacs config for a while now.

It works pretty well. It also allows you to use an older emacs ver= sion without have to mess up the compiled elpa dir of the current version. = The only side-effect is that when switching major versions the package upda= tes/installs will happen independently.

(setq p= ackage-user-dir (format "%selpa_%s/"
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0user-emacs-directory emacs-major-version))

On Thu, Feb 23, 2017 at 8:42 AM St= efan Monnier <monnier@iro.um= ontreal.ca> wrote:
> I) = Compile under master branch.
> II) Load the resultant .elc with Emacs-25

As explained by Richard, this is usually considered acceptable.
We don't really try to provide forward compatibility of byte-code files=
between major versions.

This said, occasionally we try to reduce the pain a little: e.g. in
Emacs-25 a similar incompatibility was introduced for the compilation of catch&condition-case, but the bytecodes were introduced a bit earlier.<= br class=3D"gmail_msg"> IOW the incompatibility was fundamentally introduced in 24.4 (IIRC), but the use of the this new feature was only enabled in Emacs-25.1, so files compiled with 25.1 will usually work in 24.5 as well.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--

Kaushal Modi

--94eb2c1909e2a4b194054933809a--