Bug#987683: crashes with "Wrong type argument: (or eieio-object class), nil, obj"
- To: Lev Lamberov <dogsleg@debian.org>, 987683@bugs.debian.org
- Cc: Nicholas D Steeves <nsteeves@gmail.com>
- Subject: Bug#987683: crashes with "Wrong type argument: (or eieio-object class), nil, obj"
- From: Antoine Beaupré <anarcat@debian.org>
- Date: Mon, 03 May 2021 11:35:14 -0400
- Message-id: <[🔎] 87wnsfygnh.fsf@curie.anarc.at>
- Reply-to: Antoine Beaupré <anarcat@debian.org>, 987683@bugs.debian.org
- In-reply-to: <87k0oks5vh.fsf@localhost>
- References: <161954598844.379231.6648905680177062005.reportbug@curie.anarc.at> <8735vbrrbl.fsf@localhost> <87r1iuinea.fsf@curie.anarc.at> <87wnsmqv7h.fsf@localhost> <875z06ifck.fsf@curie.anarc.at> <87tunqqo4h.fsf@localhost> <161954598844.379231.6648905680177062005.reportbug@curie.anarc.at> <87czuew9c6.fsf@angela.anarc.at> <161954598844.379231.6648905680177062005.reportbug@curie.anarc.at> <87r1it9dtu.fsf@DigitalMercury.dynalias.net> <87k0oks5vh.fsf@localhost> <161954598844.379231.6648905680177062005.reportbug@curie.anarc.at>
On 2021-04-30 10:23:14, Lev Lamberov wrote:
> Hi Nicholas,
>
> Чт 29 апр 2021 @ 13:54 Nicholas D Steeves <nsteeves@gmail.com>:
>
>> Antoine Beaupré <anarcat@debian.org> writes:
>>
>>> That didn't work, but I manually bisected my .emacs.d/init.el file and
>>> came up with this minimal reproducer:
>>>
>>> (when (require 'package nil t)
>>> (setq-default
>>> load-prefer-newer t
>>> package-enable-at-startup nil)
>>> (package-initialize)
>>
>> I wonder if this "(package-initialize)" line, while using Emacs >= 27 is
>> exposing a bug in lsp-mode? Since Emacs 27 now automatically runs
>> package-initialize in between the new early-init.el and the classic
>> .emacs.el/init.el/etc, maybe lsp-mode has an autoload cookie that gets
>> evaluated twice, leading to the broken state of the lsp sentinel?
>> Alternatively, maybe lsp-mode now assumes we live in a post-Emacs 27
>> world where all users have already dropped package-initialize from their
>> configs?
>>
>> These Emacs >= 27 changes also affect the point in emacs init where
>> package-enable-at-startup can be set:
>>
>> If non-nil, packages are made available before reading the init file
>> (but after reading the early init file). This means that if you
>> wish to set this variable, you must do so in the early init file.
>>
>> I think this bug is still valid and actionable even if removing
>> package-initialize from the minimum reproducer, and/or after moving
>> package-enable-at-startup to early-init.el makes the bug unreproducible.
>> If nothing else, it seems like our src:emacs might need a NEWS entry on
>> the topic, but that said, my suspicion is that lsp-mode could be more
>> defensive.
>
> That's interesting! Thanks for your input. I've tried Antoine's minimal
> configuration and can confirm that commenting out (package-initialize)
> resolves the problem. So, it really means that lsp-mode has an autoload
> cookie which when evaluated twice causes the bug.
So removing the (package-initialize) bit doesn't work here, i.e. I still
get the bug. Not sure why *you* are getting something different here,
but I still don't have a good workaround.
> But now I wonder to which package should we assign the bug report,
> lsp-mode, emacs, some other package?..
I have no idea.
--
La dictature c'est ferme ta gueule.
La démocratie c'est cause toujours!
- Jean-Louis Barrault
Reply to: