GNU bug report logs - #62762
'make' often errors with "Org version mismatch" after pulling a new version of the code

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Mon, 10 Apr 2023 23:10:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Max Nikulin <manikulin <at> gmail.com>
Cc: 62762 <at> debbugs.gnu.org, bzg <at> gnu.org, dmitry <at> gutov.dev, Stefan Monnier <monnier <at> iro.umontreal.ca>, Alan Mackenzie <acm <at> muc.de>, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#62762: 'make' often errors with "Org version mismatch" after pulling a new version of the code
Date: Tue, 04 Jul 2023 12:20:25 +0000
Max Nikulin <manikulin <at> gmail.com> writes:

>> Do you know how to do it? Our previous reproducers involved M-x
>> package-install, but I am not sure how to test it without ELPA release.
>
> I have not tried yet, but I hope, preparing a tar file and using 
> `package-install-file' should behave in the same way as installing from 
> ELPA. Some spacemacs users believe they have noticed some difference, 
> but I am not convinced.

I tried this and indeed it revealed issues...

With

(defmacro org-require-with-shadowcheck (feature)
  "Load FEATURE making sure that it is loaded using current `load-path'.
When FEATURE is not yet loaded, act like `require' does.  When FEATURE
is loaded, but not consistent with the current value of `load-path',
re-load it."
  `(eval-and-compile
     (if (not (featurep ,feature)) (require ,feature)
       (let ((file (locate-library (symbol-name ,feature))))
         (unless (equal (feature-file ,feature) file)
	   ;; 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.
           (load file nil t t))))))

using https://git.sr.ht/~yantar92/org-mode/tree/feature/shadowcheck

1. emacs-30 -Q
2. M-x org-version
3. M-x package-install-file <RET> /path/to/org/lisp

I am getting

ob-C.el:40:2: Error: Eager macro-expansion failure: (error "Eager macro-expansion skipped due to cycle:
  … => (load \"org-element.el\") => (macroexpand-all (org-require-with-shadowcheck 'org …)) => (macroexpand (org-require-with-shadowcheck …)) => (load \"org.el\") => (load \"org-element.el\")")

which is rather curious since org.el is not supposed to load
org-element.el

I feel that I am missing something obvious.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 1 year and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.