Subject: Re: bug#62762: 'make' often errors with "Org version mismatch" after pulling a new version of the code

From: Max Nikulin <[email-masked]>
Date: Wed, 10 May 2023 21:52:46 +0700

On 08/05/2023 17:05, Ihor Radchenko wrote:
> Max Nikulin writes:
>> (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))))
> 
> I think we can try to do the following:
> 
> 1. Use the load-dir test, warn, and try to re-load
> 2. Use org-assert-version, but downgrade error to simple warning

Ihor, final decision is up to you.

I think, `org-reload' may be recommended in a warning message. I am 
unsure if `org-reload' called from the assertion while an Org component 
is loaded may not cause a more severe issue. My special concern is 
reloading when new Org is being compiled: is it safe or reloading should 
be suppressed completely?

I believe, during creation of .elc files, assert macro should signal an 
error since a warning is not enough to prevent loading mixed compilation 
result to next Emacs session. I do not like that currently during 
compiling with old Org loaded, `org-assert-version' causes just a 
warning. Users have difficulties with clean recompiling.

While loading, non-fatal error may be a better option when versions do 
not differ too much.

I like that you are not going to throw version check away completely.