Subject: bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp

From: Eric Abrahamsen <[email-masked]>
Date: Tue, 02 Apr 2024 20:22:28 -0700

Robert Pluim <[email-masked]> writes:

>>>>>> On Tue, 02 Apr 2024 16:57:35 +0200, Robert Pluim <[email-masked]> said:
>
>>>>>> On Tue, 02 Apr 2024 10:14:09 -0400, Andrea Corallo <[email-masked]> said:
>     Andrea> Robert Pluim <[email-masked]> writes:
>     >>> Just for fun I tried enabling the native compiler, and keep running
>     >>> into the following error with my config (-Q is fine).
>     >>> 
>     >>> Iʼve tried reinstalling key-chord and ebdb, but thatʼs made no difference.
>     >>> 
>     >>> I know nothing about eieio, but the defclass for ebdb-field-pgp has a
>     >>> superclass:
>     >>> 
>     >>> (defclass ebdb-field-pgp (ebdb-field-user)
>
>     Andrea> Hi Robert,
>
>     Andrea> could you provide a reproducer we can use to look into it?
>
>     Robert> Iʼve tried to cut my .emacs down, but having just key-chord and ebdb
>     Robert> is not enough. More work required.
>
> Itʼs very frustrating: I can make the error go away, but then it
> doesnʼt come back :-(
>
> (I can still get it with my original .emacs and emacs home directory though)

Weird!

ebdb-pgp.el, ebdb-org.el and ebdb-gnus.el all have autoload cookies on
`defclass' forms. You've already got Gnus required (naturally), but the
other autoloads are causing the evaluation of the forms without
requiring the library that provides the parent classes.

At least, that's what my crystal ball says! Both ebdb-pgp.el and
ebdb-org.el require ebdb-com, which in turn requires ebdb.el, which is
where ebdb-field-user is defined. But that somehow isn't getting pulled
in for the native compilation (?).

It's also very likely that we're not supposed to be using autoload
cookies on defclass forms at all...