From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62762: 'make' often errors with "Org version mismatch" after pulling a new version of the code Date: Sat, 22 Apr 2023 10:30:01 -0400 Message-ID: References: <17b74a48-94e1-9106-cc79-d31972313910@gutov.dev> <837cujaqzq.fsf@gnu.org> <87wn2ilwed.fsf@localhost> <83zg7ealrd.fsf@gnu.org> <87pm8a8dx4.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10967"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: bzg@gnu.org, dmitry@gutov.dev, Eli Zaretskii , 62762@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 22 16:31:20 2023 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 1pqEGm-0002ew-6l for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Apr 2023 16:31:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqEGX-0000Zk-JD; Sat, 22 Apr 2023 10:31:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqEGU-0000Yy-VD for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2023 10:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqEGU-00073t-NY for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2023 10:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pqEGU-0004rq-Al for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2023 10:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Apr 2023 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62762 X-GNU-PR-Package: emacs Original-Received: via spool by 62762-submit@debbugs.gnu.org id=B62762.168217381618650 (code B ref 62762); Sat, 22 Apr 2023 14:31:02 +0000 Original-Received: (at 62762) by debbugs.gnu.org; 22 Apr 2023 14:30:16 +0000 Original-Received: from localhost ([127.0.0.1]:43788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqEFj-0004qj-Vu for submit@debbugs.gnu.org; Sat, 22 Apr 2023 10:30:16 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqEFd-0004pG-K9 for 62762@debbugs.gnu.org; Sat, 22 Apr 2023 10:30:15 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 13D10808B2; Sat, 22 Apr 2023 10:30:04 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C42238051E; Sat, 22 Apr 2023 10:30:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1682173802; bh=rUkpNwVvsArFxNTkkaeDLvhgUWyBS9EVqrF9UUUuWY8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=G3i65MYThm68zNpqgsFXY5o2xTLPOP0d+PJdmHwP7X9q6v9T/KWDnFbkVTQbBqpv9 qBFVTMVFr6ZSM3awlS//y3kxwsAKhUS3a3XOlo/ykFjQZ/DxXATvgcw5atQQtITALk w4b7FmRw6jWvPZfatxB6qeVgP7lz/qQpoxkWIeImv0UHVYCjGA4YsGy5HzhlaL8QWZ 1apwbetCGE7yvyKPVS+hN2XeqnC1vTaR0Hb81u+GNVnqafuQJ04YCz01e32n4mPmce ixtXvjbwmLYfDI1pPS4SsZyWbNLMi92hcBZVASMSh72+FwcJp3UXUeo/qzjAa/WLN2 ZHYNW7URNukuQ== Original-Received: from pastel (unknown [45.72.217.176]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7FE45120315; Sat, 22 Apr 2023 10:30:02 -0400 (EDT) In-Reply-To: <87pm8a8dx4.fsf@localhost> (Ihor Radchenko's message of "Tue, 11 Apr 2023 18:35:51 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260477 Archived-At: > I don't. Say, why not to store hash of the macro sources in the byte > code and verifying the hash when re-compilation is requested? Though I > am not that much familiar with Emacs source compilation. In theory it's possible. Nobody has worked on it :-) Note that it's not just macros but defsubsts as well. > Sure, in the context of Emacs compilation. The code in question is > mostly aiming at newer Org installed on top of built-in Org. We are > consistently getting issues related to incorrect macro expansion and > mixing different Org versions. Someone=E2=84=A2 *really* needs to sit down and fix the underlying problem = in `package.el`. The current "solution" in `package.el` *should* work (it should reload the new `org-macs.el` on top of the old one, which I think should avoid all the problems seen in practice for Org), so it seems we just have a plain bug in the implementation of our "solution". [ Which is good: it should be simple to fix, compared to trying to come up with another solution. ] >> Anyway, any other words of wisdom? Like which org/*.el files actually >> need to be recompiled in this case? Or are you saying all of them >> need to be recompiled? [ BTW, `rm lisp/org/*.elc` is a better solution since it avoids changing timestamps on all those .el files. ] > What we might do to work around the problem is detecting Emacs compilation > and disable the check. Is there a way to detect that Emacs source is > being compiled from Elisp? This sounds like adding more brittle hacks on top of brittle hacks. >> I also am not sure I understand the logic of this test: AFAIU it only >> tests the version string, not the actual macros that might have been >> changed. Are you saying that Org bumps its version string each time >> _any_ Org macro is modified? > > No. We originally tested by commit hash. Version string check is a > trade-off between the problem with ELPA builds (see the links in my > previous message) and the need to detect mixed installation problems. BTW, have you tried to use a test along the lines of: look through `load-history` to see if we loaded org-* files from a different directory than the one in which `load-file-name` resides? [ We may need to adjust the test to account for the `package.el` "solution" which will result in the above test detecting a mixed version situation even though it "should" work correctly. ] Stefan