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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 04 May 2023 17:10:56 +0300

> Date: Thu, 4 May 2023 14:02:37 +0000
> Cc: [email-masked], [email-masked], [email-masked],
>   [email-masked], [email-masked], [email-masked]
> From: Alan Mackenzie <[email-masked]>
> 
> > No, the situation with CC Mode solution is far from ideal.  It's the
> > reason that we have had the dependencies below in lisp/Makefile.in for
> > the past 15 years:
> 
> The dependencies in Lisp/Makefile are there because there are actual
> dependencies between the CC Mode source files.

The same is true for Org.  The reason for the dependency is
immaterial; the result is the same.

> > Each time some of the cc-*.el files change we recompile all of them.
> > The difference between this and Org is that Org has many more files,
> > so spelling out their dependencies is impractical (that was the first
> > possible solution I thought about when I tried to solve the Org
> > issue).
> 
> There are other subprojects in Emacs with several/many source files,
> such as gnus, cedet, and calc.  How do they manage to stay coherent
> without special mechanisms?

The "secret" is not to use macros, or use them as little as possible.
Stale expanded macros from *.elc files cause breakage.