unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
@ 2024-04-02 14:04 Robert Pluim
  2024-04-02 14:14 ` Andrea Corallo
  2024-04-02 14:17 ` Robert Pluim
  0 siblings, 2 replies; 13+ messages in thread
From: Robert Pluim @ 2024-04-02 14:04 UTC (permalink / raw)
  To: 70141

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)

Debugger entered--Lisp error: (wrong-type-argument cl--class nil)
  cl--class-allparents(nil)
  cl--class-allparents(#s(eieio--class :name ebdb-field-pgp :docstring nil :parents (nil) :slots nil :index-table nil :children nil :initarg-tuples nil :class-slots nil :class-allocation-values nil :default-object-cache nil :options nil))
  comp--cl-class-hierarchy(ebdb-field-pgp)
  comp--compute-typeof-types()
  make-comp-cstr-ctxt()
  byte-code("\302 \30\303\304\305\"\11\306\211\211\211\211\5:\2037\0\5@\262\3\2\211A\262\4\242\262\5\2@\262\4\307\4!\262\2\310\5\3\6\11#\210\5A\262\6\210\306\202\15\0)\6\6\207" [comp-ctxt comp-known-type-specifiers make-comp-cstr-ctxt make-hash-table :test eq nil comp-type-spec-to-cstr puthash] 11)
  (defconst comp-known-func-cstr-h (byte-code "\302 \30\303\304\305\"\11\306\211\211\211\211\5:\2037\0\5@\262\3\2\211A\262\4\242\262\5\2@\262\4\307\4!\262\2\310\5\3\6\11#\210\5A\262\6\210\306\202\15\0)\6\6\207" [comp-ctxt comp-known-type-specifiers make-comp-cstr-ctxt make-hash-table :test eq nil comp-type-spec-to-cstr puthash] 11) "Hash table function -> `comp-constraint'.")
  comp-c-func-name(start-kbd-macro "subr--trampoline-" t)
  comp-trampoline-filename(start-kbd-macro)
  comp-trampoline-search(start-kbd-macro)
  comp-subr-trampoline-install(start-kbd-macro)
  #f(compiled-function (v1311) #<bytecode -0xec7955ad0edb4ef>)(#f(advice key-chord--start-kbd-macro :after #f(compiled-function (append &optional no-exec) "Record subsequent keyboard input, defining a keyboard macro.\nThe commands are recorded even as they are executed.\nUse \\[end-kbd-macro] to finish recording and make the macro available.\nUse \\[name-last-kbd-macro] to give it a permanent name.\nNon-nil arg (prefix arg) means append to last macro defined;\nthis begins by re-executing that macro as if you typed it again.\nIf optional second arg, NO-EXEC, is non-nil, do not re-execute last\nmacro before appending to it." (interactive "P") #<bytecode 0x102b94c243f7>)))
  #f(compiled-function (gv--val) #<bytecode -0xa3525baebab5ba5>)(#f(advice key-chord--start-kbd-macro :after #f(compiled-function (append &optional no-exec) "Record subsequent keyboard input, defining a keyboard macro.\nThe commands are recorded even as they are executed.\nUse \\[end-kbd-macro] to finish recording and make the macro available.\nUse \\[name-last-kbd-macro] to give it a permanent name.\nNon-nil arg (prefix arg) means append to last macro defined;\nthis begins by re-executing that macro as if you typed it again.\nIf optional second arg, NO-EXEC, is non-nil, do not re-execute last\nmacro before appending to it." (interactive "P") #<bytecode 0x102b94c243f7>)))
  advice--add-function(:after (#f(compiled-function () #<bytecode 0x319866e3b41141>) . #f(compiled-function (gv--val) #<bytecode -0xa3525baebab5ba5>)) key-chord--start-kbd-macro nil)
  advice-add(start-kbd-macro :after key-chord--start-kbd-macro)
  (key-chord-mode 1)
  load-with-code-conversion("/home/rpluim/.emacs" "/home/rpluim/.emacs" t t)

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.16.0) of 2024-04-02 built on rltb
Repository revision: a5fbb652ed3614d6735015551564f32b80e42c53
Repository branch: ncomp
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure -C'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Robert
-- 





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-02 14:04 bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp Robert Pluim
@ 2024-04-02 14:14 ` Andrea Corallo
  2024-04-02 14:57   ` Robert Pluim
  2024-04-03 20:45   ` Andrea Corallo
  2024-04-02 14:17 ` Robert Pluim
  1 sibling, 2 replies; 13+ messages in thread
From: Andrea Corallo @ 2024-04-02 14:14 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 70141

Robert Pluim <rpluim@gmail.com> 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)

Hi Robert,

could you provide a reproducer we can use to look into it?

Thanks

  Andrea





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-02 14:04 bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp Robert Pluim
  2024-04-02 14:14 ` Andrea Corallo
@ 2024-04-02 14:17 ` Robert Pluim
  1 sibling, 0 replies; 13+ messages in thread
From: Robert Pluim @ 2024-04-02 14:17 UTC (permalink / raw)
  To: 70141; +Cc: Eric Abrahamsen

>>>>> On Tue, 02 Apr 2024 16:04:51 +0200, Robert Pluim <rpluim@gmail.com> said:

    Robert> Just for fun I tried enabling the native compiler, and keep running
    Robert> into the following error with my config (-Q is fine).

    Robert> Iʼve tried reinstalling key-chord and ebdb, but thatʼs made no difference.

    Robert> I know nothing about eieio, but the defclass for ebdb-field-pgp has a
    Robert> superclass:

    Robert>     (defclass ebdb-field-pgp (ebdb-field-user)

Actually, if I add

    (require 'ebdb-pgp)
    (require 'ebdb-org)

to my .emacs before enabling key-chord-mode, the error disappears, so
perhaps this is an ebdb bug rather than an emacs one, although Iʼm not
conscious of using either of those addons. Eric? (this is
ebdb 0.8.22)

Robert
-- 





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-02 14:14 ` Andrea Corallo
@ 2024-04-02 14:57   ` Robert Pluim
  2024-04-02 16:24     ` Robert Pluim
  2024-04-03 20:45   ` Andrea Corallo
  1 sibling, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2024-04-02 14:57 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 70141

>>>>> On Tue, 02 Apr 2024 10:14:09 -0400, Andrea Corallo <acorallo@gnu.org> said:

    Andrea> Robert Pluim <rpluim@gmail.com> 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?

Iʼve tried to cut my .emacs down, but having just key-chord and ebdb
is not enough. More work required.

Robert
-- 





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-02 14:57   ` Robert Pluim
@ 2024-04-02 16:24     ` Robert Pluim
  2024-04-03  3:22       ` Eric Abrahamsen
  0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2024-04-02 16:24 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 70141

>>>>> On Tue, 02 Apr 2024 16:57:35 +0200, Robert Pluim <rpluim@gmail.com> said:

>>>>> On Tue, 02 Apr 2024 10:14:09 -0400, Andrea Corallo <acorallo@gnu.org> said:
    Andrea> Robert Pluim <rpluim@gmail.com> 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)

Robert
-- 





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-02 16:24     ` Robert Pluim
@ 2024-04-03  3:22       ` Eric Abrahamsen
  2024-04-03  6:45         ` Robert Pluim
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Abrahamsen @ 2024-04-03  3:22 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Andrea Corallo, 70141

Robert Pluim <rpluim@gmail.com> writes:

>>>>>> On Tue, 02 Apr 2024 16:57:35 +0200, Robert Pluim <rpluim@gmail.com> said:
>
>>>>>> On Tue, 02 Apr 2024 10:14:09 -0400, Andrea Corallo <acorallo@gnu.org> said:
>     Andrea> Robert Pluim <rpluim@gmail.com> 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...





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-03  3:22       ` Eric Abrahamsen
@ 2024-04-03  6:45         ` Robert Pluim
  0 siblings, 0 replies; 13+ messages in thread
From: Robert Pluim @ 2024-04-03  6:45 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: Andrea Corallo, 70141

>>>>> On Tue, 02 Apr 2024 20:22:28 -0700, Eric Abrahamsen <eric@ericabrahamsen.net> said:

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

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

I donʼt get it either. I tried adding autoload cookies for
ebdb-field-user and ebdb-field and regenerating the package autoloads,
but that didnʼt help either.

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

Iʼll defer to others on that question :-)

Robert
-- 





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-02 14:14 ` Andrea Corallo
  2024-04-02 14:57   ` Robert Pluim
@ 2024-04-03 20:45   ` Andrea Corallo
  2024-04-04  3:05     ` Eric Abrahamsen
  2024-04-08 10:10     ` Andrea Corallo
  1 sibling, 2 replies; 13+ messages in thread
From: Andrea Corallo @ 2024-04-03 20:45 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 70141

Andrea Corallo <acorallo@gnu.org> writes:

> Robert Pluim <rpluim@gmail.com> 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)
>
> Hi Robert,
>
> could you provide a reproducer we can use to look into it?
>
> Thanks
>
>   Andrea

We should not crash but that said thinking about it...  I don't think
the compiler should reason about classes at all, as they are redefinable
at runtime.  On the contrary structs are (at least in CL) considered not
re-definable at runtime so it's fine.

  Andrea





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-03 20:45   ` Andrea Corallo
@ 2024-04-04  3:05     ` Eric Abrahamsen
  2024-04-04  8:05       ` Andrea Corallo
  2024-04-08 10:10     ` Andrea Corallo
  1 sibling, 1 reply; 13+ messages in thread
From: Eric Abrahamsen @ 2024-04-04  3:05 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: Robert Pluim, 70141

Andrea Corallo <acorallo@gnu.org> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>> Robert Pluim <rpluim@gmail.com> 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)
>>
>> Hi Robert,
>>
>> could you provide a reproducer we can use to look into it?
>>
>> Thanks
>>
>>   Andrea
>
> We should not crash but that said thinking about it...  I don't think
> the compiler should reason about classes at all, as they are redefinable
> at runtime.  On the contrary structs are (at least in CL) considered not
> re-definable at runtime so it's fine.

Do you have an opinion about whether autoload cookies on defclass
statements are a bad idea altogether?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-04  3:05     ` Eric Abrahamsen
@ 2024-04-04  8:05       ` Andrea Corallo
  0 siblings, 0 replies; 13+ messages in thread
From: Andrea Corallo @ 2024-04-04  8:05 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: Robert Pluim, 70141

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>> Andrea Corallo <acorallo@gnu.org> writes:
>>
>>> Robert Pluim <rpluim@gmail.com> 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)
>>>
>>> Hi Robert,
>>>
>>> could you provide a reproducer we can use to look into it?
>>>
>>> Thanks
>>>
>>>   Andrea
>>
>> We should not crash but that said thinking about it...  I don't think
>> the compiler should reason about classes at all, as they are redefinable
>> at runtime.  On the contrary structs are (at least in CL) considered not
>> re-definable at runtime so it's fine.
>
> Do you have an opinion about whether autoload cookies on defclass
> statements are a bad idea altogether?

I don't (ATM), why do you think it should be problematic?

  Andrea





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-03 20:45   ` Andrea Corallo
  2024-04-04  3:05     ` Eric Abrahamsen
@ 2024-04-08 10:10     ` Andrea Corallo
  2024-04-08 15:42       ` Robert Pluim
  1 sibling, 1 reply; 13+ messages in thread
From: Andrea Corallo @ 2024-04-08 10:10 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 70141

Andrea Corallo <acorallo@gnu.org> writes:

> Andrea Corallo <acorallo@gnu.org> writes:
>
>> Robert Pluim <rpluim@gmail.com> 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)
>>
>> Hi Robert,
>>
>> could you provide a reproducer we can use to look into it?
>>
>> Thanks
>>
>>   Andrea
>
> We should not crash but that said thinking about it...  I don't think
> the compiler should reason about classes at all, as they are redefinable
> at runtime.  On the contrary structs are (at least in CL) considered not
> re-definable at runtime so it's fine.

Okay with c9d7721db6e into master the native compiler should not reason
anymore about EIEIO classes.

Robert could you check if this solves the issue you reported?

Thanks

  Andrea





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-08 10:10     ` Andrea Corallo
@ 2024-04-08 15:42       ` Robert Pluim
  2024-04-08 15:47         ` Andrea Corallo
  0 siblings, 1 reply; 13+ messages in thread
From: Robert Pluim @ 2024-04-08 15:42 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 70141

>>>>> On Mon, 08 Apr 2024 06:10:21 -0400, Andrea Corallo <acorallo@gnu.org> said:
    Andrea> Okay with c9d7721db6e into master the native compiler should not reason
    Andrea> anymore about EIEIO classes.

    Andrea> Robert could you check if this solves the issue you reported?

Hi Andrea, I built 600ac35cc65, emacs starts up fine. Thanks for the
fix.

Robert
-- 





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp
  2024-04-08 15:42       ` Robert Pluim
@ 2024-04-08 15:47         ` Andrea Corallo
  0 siblings, 0 replies; 13+ messages in thread
From: Andrea Corallo @ 2024-04-08 15:47 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 70141-done

Robert Pluim <rpluim@gmail.com> writes:

>>>>>> On Mon, 08 Apr 2024 06:10:21 -0400, Andrea Corallo <acorallo@gnu.org> said:
>     Andrea> Okay with c9d7721db6e into master the native compiler should not reason
>     Andrea> anymore about EIEIO classes.
>
>     Andrea> Robert could you check if this solves the issue you reported?
>
> Hi Andrea, I built 600ac35cc65, emacs starts up fine. Thanks for the
> fix.

Very cool, so I'm closing this.

Thanks

  Andrea





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-08 15:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 14:04 bug#70141: 30.0.50; cl--class-allparents throws error for ebdb-field-pgp Robert Pluim
2024-04-02 14:14 ` Andrea Corallo
2024-04-02 14:57   ` Robert Pluim
2024-04-02 16:24     ` Robert Pluim
2024-04-03  3:22       ` Eric Abrahamsen
2024-04-03  6:45         ` Robert Pluim
2024-04-03 20:45   ` Andrea Corallo
2024-04-04  3:05     ` Eric Abrahamsen
2024-04-04  8:05       ` Andrea Corallo
2024-04-08 10:10     ` Andrea Corallo
2024-04-08 15:42       ` Robert Pluim
2024-04-08 15:47         ` Andrea Corallo
2024-04-02 14:17 ` Robert Pluim

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).