On Mon, Oct 18 2021 23:38 (+0300), Dmitry Gutov wrote:
The breakage happens because xref 1.3.0 has been published on GNU ELPA
https://elpa.gnu.org/packages/ (although the details page shows 1.2.2 as
the latest version, don't know why). I am using the "eglot" package,
which requires xref (at a lower minimum version), and when upgrading
packages this morning, I got xref 1.3.0.
Which version of Emacs are you using? I understand Emacs 26 might have a
problem with :noinline instructions in the new struct definitions.
I am using the feature/pgtk branch, which is currently based on an older
master (roughly 3m ago) it seems.
But as for loading eieio and defining the xref-location class, the
top-level version check at the beginning of xref.el should supposedly
help. It looks like:
(eval-and-compile
(when (version< emacs-version "28")
;; etags.el in Emacs 26 and 27 uses EIEIO, and its location type
;; inherits from `xref-location'.
(require 'eieio)
(with-no-warnings
(defclass xref-location () ()
:documentation "..."))))
Ah, I did not look at the 1.3.0 file. So the above will help for all
released emacs versions, but will just not run for a non-recent master
of Emacs 28, get it.