From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#62762: 'make' often errors with "Org version mismatch" after pulling a new version of the code Date: Wed, 3 May 2023 21:37:11 +0000 Message-ID: References: <83zg7ealrd.fsf@gnu.org> <87pm8a8dx4.fsf@localhost> <87pm7vt0mx.fsf@localhost> <87cz3k8i27.fsf@localhost> <87sfcfdldt.fsf@localhost> <87bkj1g10g.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39857"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62762@debbugs.gnu.org, bzg@gnu.org, dmitry@gutov.dev, Stefan Monnier , Eli Zaretskii , Max Nikulin To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 03 23:38:28 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 1puKB8-000AAQ-Db for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 May 2023 23:38:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puKAn-0004gW-J6; Wed, 03 May 2023 17:38: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 1puKAk-0004g8-Uj for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 17:38:03 -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 1puKAk-000517-LQ for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 17:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1puKAk-0006v2-6U for bug-gnu-emacs@gnu.org; Wed, 03 May 2023 17:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 May 2023 21:38: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.168314984126537 (code B ref 62762); Wed, 03 May 2023 21:38:02 +0000 Original-Received: (at 62762) by debbugs.gnu.org; 3 May 2023 21:37:21 +0000 Original-Received: from localhost ([127.0.0.1]:47857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puKA5-0006tx-4n for submit@debbugs.gnu.org; Wed, 03 May 2023 17:37:21 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]:56751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puKA2-0006tg-9r for 62762@debbugs.gnu.org; Wed, 03 May 2023 17:37:19 -0400 Original-Received: (qmail 93834 invoked by uid 3782); 3 May 2023 23:37:12 +0200 Original-Received: from acm.muc.de (pd953aedc.dip0.t-ipconnect.de [217.83.174.220]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 03 May 2023 23:37:11 +0200 Original-Received: (qmail 8562 invoked by uid 1000); 3 May 2023 21:37:11 -0000 Content-Disposition: inline In-Reply-To: <87bkj1g10g.fsf@localhost> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:260990 Archived-At: Hello, Ihor. It occurs to me that perhaps the CC Mode solution to the original problem might be useful. It was written by my predecessor at CC Mode, Martin Stjernholm. In ~20 years of using it, I've never had problems with using incorrect versions of macros, or anything like that. To quote part of the commentary from lisp/progmodes/cc-bytecomp.el: ;; This file is used to ensure that the CC Mode files are correctly ;; compiled regardless the environment (e.g. if an older CC Mode with ;; outdated macros are loaded during compilation). It also provides ;; features to defeat the compiler warnings for selected symbols. It works by pushing the correct directories onto load-path at the start of each compilation, and popping them off again at the end. Feel free to consider using this approach! -- Alan Mackenzie (Nuremberg, Germany). On Wed, May 03, 2023 at 10:30:55 +0000, Ihor Radchenko wrote: > Stefan Monnier writes: > >> This looks interesting, if we replace all the requires in Org with > >> `my-require-with-shadow-check'. > > > > If we make it signal an error, then I think we only need it for the > > requires that load "the one first file" (which you suggest could be > > `org-macs.el`). > This might work. > Max, do you see any obvious downsides in Stefan's idea about consulting > `load-history' vs. `load-path'? > >> Although, AFAIU, it does not address the problem with stale .elc files > >> kept from the previous Org version in the same folder (AFAIR, it is what > >> often happens in ELPA builds). > > > > I don't understand what you mean here: when `package.el` compiles the > > files of the Org package, that package has just been untarred into > > a fresh new directory, so there should never be any stale `.elc` files > > in there. > I am referring to https://orgmode.org/list/jwvsfkv5s7l.fsf-monnier+emacs@gnu.org > >> And we somehow need to make sure that `my-require-with-shadow-check' is > >> available for all its users. > > > > Ah, the fun of bootstrapping :-) > I guess that the cleanest way could be putting > `require-with-shadow-check' into a new file. Then, we have no chance of > this file being loaded by old Org version. > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at