[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: latest emacs version does not have compat-declare-version defined
From: |
Philip Kaludercic |
Subject: |
Re: latest emacs version does not have compat-declare-version defined |
Date: |
Thu, 22 Sep 2022 17:19:26 +0000 |
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Hello all,
>
> I have just updated my Emacs from git. Built and installed. However,
> when I try to use it, any package that requires the compat package fails
> with
>
> invalid-function compat-declare-version
>
> I have finally managed to get Emacs to start by removing reference to
> any packages that I was using that required 'compat. Not ideal but at
> least I'm able to read my email and get some work done...
An alternative would have been to recompile all packages.
> I've updated all ELPA/MELPA packages as well, by the way.
>
> Any pointers welcome.
>
> Thank you,
> eric
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Please ignore. The problem is in the compat package and it is a known
> problem to do with macros (and with a proposed solution that has not yet
> percolated through to elpa)... I had looked on Emacs bugs but not the
> compat package issues. My bad!
This was an unfortunate bug that I am still uncertain as to what the
cause was. My understanding is that the invalid function
`compat-declare-version' (a macro) was added to a file (compat-macs.el)
with other macros. If you update the package, and the new files are
byte-compiled, they attempt to require 'compat-macs. But as this
feature has already been loaded, nothing happens. Therefore the new
definitions are missing.
I might be mistaken, but if not the issue lies in the order which
package.el (or other package managers) decide to (re-)compile files in a
package. What might be needed is some kind of dependency analysis to
determine in what order files have to be re-compiled.
The proposed solution you mention is to always load -- not require --
"compat-macs.el" during compilation. Not pretty, but I hope it works.
> Thank you,
> eric