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: Wed, 03 May 2023 10:30:55 +0000

Stefan Monnier <[email-masked]> writes:

>> This looks interesting, if we replace all the requires in Org with
>> `my-require-with-shadow-check'.
>
> If we make it signal an error, then I think we only need it for the
> requires that load "the one first file" (which you suggest could be
> `org-macs.el`).

This might work.

Max, do you see any obvious downsides in Stefan's idea about consulting
`load-history' vs. `load-path'?

>> 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).
>
> I don't understand what you mean here: when `package.el` compiles the
> files of the Org package, that package has just been untarred into
> a fresh new directory, so there should never be any stale `.elc` files
> in there.

I am referring to https://orgmode.org/list/[email-masked]

>> And we somehow need to make sure that `my-require-with-shadow-check' is
>> available for all its users.
>
> Ah, the fun of bootstrapping :-)

I guess that the cleanest way could be putting
`require-with-shadow-check' into a new file. Then, we have no chance of
this file being loaded by old Org version.

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