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

From: Ihor Radchenko <[email-masked]>
Date: Tue, 02 May 2023 11:26:54 +0000

Stefan Monnier <[email-masked]> writes:

>> May you provide an approximate code for that function?
>
> Something like (guaranteed 100% untested):
>
>     (defun my-require-with-shadow-check (feature &optional reload)

Thanks!
This looks interesting, if we replace all the requires in Org with
`my-require-with-shadow-check'.

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).

And we somehow need to make sure that `my-require-with-shadow-check' is
available for all its users. Just like with `org-assert-version', older
Org may not provide the function and compilation/loading can fail with
"Symbol function is void".

Your idea with providing built-in `require-with-shadow-check` will
partially solve the latter problem. At least, on the latest Emacs.

-- 
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>