From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Nikulin Newsgroups: gmane.emacs.bugs Subject: bug#62762: 'make' often errors with "Org version mismatch" after pulling a new version of the code Date: Sun, 7 May 2023 23:23:15 +0700 Message-ID: <03d0e4f4-3855-fa3e-d502-bee77ea53b74@gmail.com> 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> <87sfcfdldt.fsf@localhost> <87bkj1g10g.fsf@localhost> <1c5d0ff0-5bae-1123-d2f7-64d9013fbc0f@gmail.com> <6070e598-7dee-1b7a-7f97-26a90618cb7a@gmail.com> <5603ba14-8120-cf38-05ba-4435c1bece3f@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13087"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: Ihor Radchenko , 62762@debbugs.gnu.org, bzg@gnu.org, dmitry@gutov.dev, Alan Mackenzie , Eli Zaretskii To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 07 18:24: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 1pvhBQ-0003BF-KV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 May 2023 18:24:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvhB5-00055o-5W; Sun, 07 May 2023 12:24: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 1pvhB4-00055P-2S for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 12:24: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 1pvhB3-0001jC-QS for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 12:24:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvhB3-0004bV-Lm for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 12:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Max Nikulin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 May 2023 16:24: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.168347660617643 (code B ref 62762); Sun, 07 May 2023 16:24:01 +0000 Original-Received: (at 62762) by debbugs.gnu.org; 7 May 2023 16:23:26 +0000 Original-Received: from localhost ([127.0.0.1]:38287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvhAU-0004aV-1w for submit@debbugs.gnu.org; Sun, 07 May 2023 12:23:26 -0400 Original-Received: from mail-lf1-f52.google.com ([209.85.167.52]:62516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvhAS-0004aI-1R for 62762@debbugs.gnu.org; Sun, 07 May 2023 12:23:24 -0400 Original-Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-4f139de8cefso23838084e87.0 for <62762@debbugs.gnu.org>; Sun, 07 May 2023 09:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683476598; x=1686068598; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=bzGqGzKSETiKWctOpVp6BnGHVkNm0damleA9vWbnCW0=; b=ocarLOy8ft0mFvnPTuJ14xlDGqI06LuV0bONuwHM0xyMNY6FapKczqseb2sUp3Yew+ qwuOMnzoV2+V7T3G+uFed+x5RNLaErQyte7UNKYjkWHTswQbhTha5AfRgAJp5nZ1GGZU cQ3FQuD8kiFpUjvx3QpA2hxvNl1/HQApH+imnkXsm1/ehvpM6+rfRG68vjuIIhmtNIF2 mcYUMWnZLgDj0RUJRUultMxrB+WyzBgscFMDLe8iFs06gB5+4Kov1TtU7z5Q/T0gwSoO 8emmXO64ncvE6ErJCYYebB9jZNBEeQUgE4lIU53uceLW/3Zd9mx58Z5w9XMu+fum/YgI dRyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683476598; x=1686068598; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bzGqGzKSETiKWctOpVp6BnGHVkNm0damleA9vWbnCW0=; b=UOPe+0QqkHz9KgI9z98kdtDFH+eNYdPPC9VYjVtCa7C8CckUs4xD9gEN8FE2WVd6nX PtNgoS0QW+xOTp4Jt8mYZNQXR6FVWto/xtQel9f5bLYo5KgXXzyprsBrTlt8J2ZZ8Mre E2lAsEk4LYVnW1mHcfcMTLvdrNtV1yY51wkquo8uPg3DRIV7gj0BtQXia7eJuDAs47hV saV4E4Yh2ZmILyiV/0UpgWkgs+XPPKci1LwU2G9opI6ZIN4z3XOyp/mm3oRfi47iioxS TnzWOI/l/xJxzyPD0oE0RsCCvTSIvTR1YpFrl8HQBBdzZ8pB9p375g/sbURzQKSX1h99 2hdA== X-Gm-Message-State: AC+VfDxDgUjNICllYGmlyInPn+v6jQ2/IAwPVXX5ml6F/5lk4ffczM9T IJpBQFDoSMQLjEtHpt47J+4= X-Google-Smtp-Source: ACHHUZ7dVgWu/6tT6DZN/0RjQp21SvK+SNnaAJSHy5QlU7OKTDNHGdB6FCBVuTpLY+PPCGegzgiLeg== X-Received: by 2002:a05:6512:230f:b0:4f1:21a2:9006 with SMTP id o15-20020a056512230f00b004f121a29006mr3764546lfu.18.1683476597934; Sun, 07 May 2023 09:23:17 -0700 (PDT) Original-Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id l17-20020a05651c10d100b002ab0c9fab23sm856185ljn.79.2023.05.07.09.23.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 May 2023 09:23:17 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:261267 Archived-At: On 06/05/2023 20:02, Stefan Monnier wrote: > AFAIU there are 2 main situations: > > A) recompilation (i.e. `git pull; make`). > This can happen either in Org's repository or in Emacs's repository. ... Are there brave enough developers and users who do not restart emacs after rebuild of emacs? Some Org users hope that `org-reload' works and they can update Org without restarting Emacs. > B) mixed versions from different directories. > > AFAICT `my-require-with-shadow-check` should be able to catch most/all > problems for (B), Agree. > without impacting (A), and more reliably than > `org-assert-version` (and in an arguably less ad-hoc way). Sorry, but `org-assert-version' should catch loading from the same directory a file compiled for new version since loaded earlier org-version.el defined old version that does not match `org-version' inscribed into new .elc files. I assume either combination of "make clean" and "make" or proper incremental build. That is why I disagree with "without impacting (A)". > So, to me, (assuming the above is true) the remaining question is what > Org developers want to do about `git pull; make` in Org's own repository. Perhaps `org-assert-directory' may be added to `org-assert-version' By the way, if just org-macs should be checked then would not be it more efficient in respect to load time to define a variable containing the directory and to check in other files if they are loaded from the same directory? With such approach there is no need in walking through the `load-history' list. ==> tst-macs.el <== (defun tst-get-load-dir () (file-name-directory (or load-file-name ;; For `eval-buffer'. (buffer-file-name (buffer-base-buffer))))) (defvar tst-load-dir (tst-get-load-dir)) (defun tst-assert-load-dir () (let ((dir (tst-get-load-dir)) (url "https://orgmode.org/worg/org-faq.html#mixed-install")) (unless (equal tst-load-dir dir) (error "Path shadowing detected, see <%s>. %s vs %s" url dir tst-load-dir)))) (provide 'tst-macs) ==> tst-main.el <== (require 'tst-macs) (eval-and-compile (if (fboundp 'tst-assert-load-dir) (tst-assert-load-dir) (error "Path shadowing detected, see "))) (provide 'tst-main)