GNU bug report logs - #47025
28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Tue, 9 Mar 2021 18:00:02 UTC

Severity: normal

Found in version 28.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrea Corallo <akrl <at> sdf.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 47025 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled
Date: Wed, 10 Mar 2021 15:22:45 +0000
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> (load "emacs-lisp/macroexp")
>>> (if (byte-code-function-p (symbol-function 'macroexpand-all))
>>>     nil
>>>   ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply
>>>   ;; fail until pcase is explicitly loaded.  This also means that we have to
>>>   ;; disable eager macro-expansion while loading pcase.
>>>   (let ((macroexp--pending-eager-loads '(skip))) (load "emacs-lisp/pcase"))
>>>   ;; Re-load macroexp so as to eagerly macro-expand its uses of pcase.
>>>   (let ((max-lisp-eval-depth (* 2 max-lisp-eval-depth)))
>>>     (load "emacs-lisp/macroexp")))
>>> ====
>>> 
>>> > need to preload pcase?
>>> 
>>> I fear I don't have an answer as ATM I don't uderstand why it should be
>>> different compared to master.
>>
>> Stefan, any ideas why this happens on the native-comp branch but not
>> on master?
>
> It's probably the `byte-code-function-p` which tries to distinguish the
> case where macroexp has not yet been compiled, but on the native branch,
> I suspect that (byte-code-function-p (symbol-function 'macroexpand-all))
> will return nil when macroexp has been compiled because it's now
> a `subrp`.

Ops should have spotted that :/ thanks for the suggestion.

711b2c8349 fix this for me.

Eli let me know if we are okay to close.

Thanks

  Andrea




This bug report was last modified 4 years and 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.