From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83r1kop5rq.fsf@gnu.org> <838s6vp32t.fsf@gnu.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8045"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47025@debbugs.gnu.org, Eli Zaretskii To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 10 16:23:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lK0g2-0001xF-FG for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Mar 2021 16:23:10 +0100 Original-Received: from localhost ([::1]:48352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK0g1-0001D0-HZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Mar 2021 10:23:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK0fu-0001Cg-Sq for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2021 10:23:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK0fu-0007Io-LO for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2021 10:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lK0fu-0006KI-IG for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2021 10:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Mar 2021 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47025 X-GNU-PR-Package: emacs Original-Received: via spool by 47025-submit@debbugs.gnu.org id=B47025.161538976824274 (code B ref 47025); Wed, 10 Mar 2021 15:23:02 +0000 Original-Received: (at 47025) by debbugs.gnu.org; 10 Mar 2021 15:22:48 +0000 Original-Received: from localhost ([127.0.0.1]:51614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lK0ff-0006JS-TT for submit@debbugs.gnu.org; Wed, 10 Mar 2021 10:22:48 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:55914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lK0fe-0006JK-1q for 47025@debbugs.gnu.org; Wed, 10 Mar 2021 10:22:46 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 12AFMjXc025602 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 10 Mar 2021 15:22:45 GMT In-Reply-To: (Stefan Monnier's message of "Wed, 10 Mar 2021 09:02:35 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202004 Archived-At: Stefan Monnier 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