From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Robert Weiner <rsw@gnu.org>
Cc: rswgnu@gmail.com, Kaushal Modi <kaushal.modi@gmail.com>,
cpitclaudel@gmail.com, Emacs developers <emacs-devel@gnu.org>,
Eli Zaretskii <eliz@gnu.org>, Vibhav Pant <vibhavp@gmail.com>,
Tino Calancha <tino.calancha@gmail.com>
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: Sat, 02 Jul 2022 17:28:55 -0400 [thread overview]
Message-ID: <jwvr133nrj2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CA+OMD9gj+kSh7o7CFzx+GoWuxVwWM2KjPJ0pm2v1ry9-M38wHA@mail.gmail.com> (Robert Weiner's message of "Sat, 2 Jul 2022 16:31:35 -0400")
> I'm with you on your thoughts about removing the need for users to often
> have to deal with byte-code or native-code compilation differences when
> running different major versions of Emacs. But it is now 2022 and the
> situation seems to be much worse than it was five years ago.
What makes you think it is worse?
> Say you use Emacs 27, 28 and 29,
5 years ago, that would have been ... 25, 26, and 27, right?
> some with native compilation and some not.
AFAIK native compilation is fully transparent, so it shouldn't make
cause any extra trouble for the end-user (except maybe when it doesn't
work, but that's a separate issue).
> But you want to keep the same set of packages in use across all
> these installations.
The rule is that you need to compile with the oldest Emacs you're
still using. Can you think of a package that can be compiled with
Emacs-27 but whose resulting .elc files won't work in Emacs-29?
AFAIK the only problem with a situation like the one you describe
is when the user install a package with Emacs-NN and then tries to use
this package with Emacs-MM where MM < NN.
Ideally, we should detect this situation and force a recompilation of
the package (the result of which should still work fine on Emacs-NN).
The .elc files already contain the needed info: they start with
";ELC<NN>" where <NN> is a char that represents the major version of
Emacs that compiled this file (char code 28 for both Emacs-28.1 and
Emacs-28.2).
So it's a "small matter" of adding code to detect when we load a file
that's been compiled by a "future Emacs" and then cause it to be recompiled.
Stefan
next prev parent reply other threads:[~2022-07-02 21:28 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 17:50 [PATCH]: Add new bytecode op `switch' for implementing branch tables Vibhav Pant
2017-02-06 18:30 ` Stefan Monnier
2017-02-07 8:45 ` Vibhav Pant
2017-02-07 14:41 ` Stefan Monnier
[not found] ` <CA+T2Sh3N09WGoHtNL3BbptsKA1ZdwWedTNDd0vmeBe0fTO5a1g@mail.gmail.com>
[not found] ` <CA+T2Sh2sa6=WOvyePzL_ACR0Nw=jTnZze_xXFcvL=22OURP=ZA@mail.gmail.com>
2017-02-07 15:21 ` Vibhav Pant
2017-02-07 13:50 ` Vibhav Pant
2017-02-07 15:56 ` Clément Pit-Claudel
2017-02-08 13:38 ` Vibhav Pant
2017-02-08 16:21 ` Vibhav Pant
2017-02-08 17:46 ` Vibhav Pant
2017-02-09 13:21 ` Stefan Monnier
2017-02-08 17:56 ` Eli Zaretskii
2017-02-23 4:35 ` Compiled code in Emacs-26 will fail in Emacs-25 if use pcase [was: Add new bytecode op `switch' for implementing branch tables.] Tino Calancha
2017-02-23 8:36 ` Richard Copley
2017-02-23 10:12 ` Tino Calancha
2022-07-04 12:24 ` Vibhav Pant
2017-02-23 13:39 ` Stefan Monnier
2017-02-23 14:33 ` Kaushal Modi
2017-02-23 15:10 ` Stefan Monnier
2022-07-02 20:31 ` Robert Weiner
2022-07-02 21:28 ` Stefan Monnier [this message]
[not found] ` <CA+T2Sh29UhuNrhRZG=PPQbYYHtONXwyb8dX4rBVLmwdORLELhg@mail.gmail.com>
2017-02-23 17:50 ` Vibhav Pant
2017-04-11 17:40 ` Compiled code in Emacs-26 will fail in Emacs-25 if use pcase Lars Brinkhoff
2017-02-23 16:15 ` Compiled code in Emacs-26 will fail in Emacs-25 if use pcase [was: Add new bytecode op `switch' for implementing branch tables.] raman
2017-02-23 17:24 ` Drew Adams
2017-02-23 17:50 ` T.V Raman
2017-02-23 18:02 ` Drew Adams
2017-02-23 18:24 ` T.V Raman
2017-02-23 19:00 ` Drew Adams
2017-02-24 2:06 ` defsubst VS defun or defmacro [was RE: Compiled code in Emacs-26 will fail in Emacs-25 if use pcase] Tino Calancha
2017-02-24 3:14 ` Eric Abrahamsen
2017-02-24 3:56 ` raman
2017-02-24 4:20 ` Eric Abrahamsen
2017-02-24 3:51 ` raman
2017-02-09 17:32 ` [PATCH]: Add new bytecode op `switch' for implementing branch tables Clément Pit-Claudel
2017-02-09 19:15 ` Clément Pit-Claudel
2017-02-10 4:12 ` Vibhav Pant
2017-02-10 4:17 ` Clément Pit-Claudel
2017-02-10 5:03 ` Vibhav Pant
2017-02-10 6:07 ` Stefan Monnier
2017-02-10 13:51 ` Vibhav Pant
2017-02-10 15:12 ` Stefan Monnier
2017-02-10 17:59 ` Vibhav Pant
2017-02-10 18:25 ` Vibhav Pant
2017-02-10 20:47 ` Paul Eggert
2017-02-10 20:58 ` Stefan Monnier
2017-02-11 15:07 ` Vibhav Pant
2017-02-12 3:10 ` Vibhav Pant
2017-02-13 7:18 ` Vibhav Pant
2017-02-09 16:37 ` Vibhav Pant
2017-02-06 19:32 ` Eli Zaretskii
2017-02-07 14:26 ` Vibhav Pant
2017-02-07 16:14 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvr133nrj2.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=cpitclaudel@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=kaushal.modi@gmail.com \
--cc=rsw@gnu.org \
--cc=rswgnu@gmail.com \
--cc=tino.calancha@gmail.com \
--cc=vibhavp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).