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: Mon, 01 May 2023 12:49:04 -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> <87pm7vt0mx.fsf@localhost> <87cz3k8i27.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14146"; 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 Mon May 01 18:50:24 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 1ptWjG-0003Rm-O1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 May 2023 18:50:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptWix-000534-JD; Mon, 01 May 2023 12:50:03 -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 1ptWiw-00052u-3d for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 12:50: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 1ptWiv-0003wm-Nl for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 12:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ptWiv-0007UZ-J9 for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 12:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 May 2023 16:50:01 +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.168295975628743 (code B ref 62762); Mon, 01 May 2023 16:50:01 +0000 Original-Received: (at 62762) by debbugs.gnu.org; 1 May 2023 16:49:16 +0000 Original-Received: from localhost ([127.0.0.1]:40937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptWiC-0007TX-4x for submit@debbugs.gnu.org; Mon, 01 May 2023 12:49:16 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptWi9-0007TI-Cp for 62762@debbugs.gnu.org; Mon, 01 May 2023 12:49:14 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CF11444189E; Mon, 1 May 2023 12:49:07 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 891F144174C; Mon, 1 May 2023 12:49:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1682959746; bh=AVHwR1+IDVzx3/XgPZZ4nhCqqnHIKJ69JIQkyeunOYw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LIysqJ+YQhLQm2fi3Ju1An5tZN0KnZ/596eikHjOEBj6Z/v0EFc/8nfESxvtjy9Vi PmN0/f8WRlU905AHZ0gsr5urrUUCoZxopsigyDgyIIBdLYpNHCcqfjv5WKomtmGALJ /G3UbBtQy+v7OR2LAqpAn5HuW2sfnqWCnf61LqXhg+L8y8S5HTGY3qIMPFPUD8ftOD lCKaVEH0GIrLiL7kF418SzgSpSnSnYdhNR+2fVWQEuKdDV03D+09cog5LaRrhsYsY4 4ych3FolBr5lMovY3pp637vkqthJo+0hlTfHw0RixGejkguKMTUkjg5LnBlYTDWVkL i6z/CGoo07aPg== Original-Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4B10C12040D; Mon, 1 May 2023 12:49:06 -0400 (EDT) In-Reply-To: <87cz3k8i27.fsf@localhost> (Ihor Radchenko's message of "Mon, 01 May 2023 10:25:20 +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:260879 Archived-At: > May you provide an approximate code for that function? Something like (guaranteed 100% untested): (defun my-require-with-shadow-check (feature &optional reload) (if (not (featurep feature)) (require feature) (let ((file (locate-file (symbol-name feature) load-path (get-load-suffixes)))) (if (assoc file load-history) ;; The desired file is already loaded, we're clear! nil ;; The feature is already provided, but from some other file ;; than expected. Presumably because `load-path` has been ;; changed since the file was loaded. This is likely a sign ;; that we're loading a mix of files from different versions. ;; That can spell trouble. (if reload ;; Try and fix the situation by force-reloading the file ;; This may fix the problem but only if that file doesn't ;; `require` any other affected file, or if it also ;; uses `my-require-with-shadow-check` to similarly reload ;; any other affected file. (load file nil t t) ;; We could try and find the "other/older" file in `load-history` ;; to provide better feedback to the user. (error "Mixed versions!!")))))) -- Stefan