From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: [native-comp] Small, new bug with macros? Date: Mon, 06 Apr 2020 20:45:13 +0000 Message-ID: References: <87h7xyhu5f.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="127841"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 06 22:46:09 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jLYdE-000X9S-QV for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 22:46:08 +0200 Original-Received: from localhost ([::1]:37976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLYdD-0002MM-UW for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Apr 2020 16:46:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33293) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLYcQ-0001qd-SL for emacs-devel@gnu.org; Mon, 06 Apr 2020 16:45:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLYcP-0001Dv-J0 for emacs-devel@gnu.org; Mon, 06 Apr 2020 16:45:18 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:51545) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLYcP-0001B3-C3 for emacs-devel@gnu.org; Mon, 06 Apr 2020 16:45:17 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 036KjEc8000684 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 6 Apr 2020 20:45:14 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 036KjDiC023077; Mon, 6 Apr 2020 20:45:13 GMT In-Reply-To: <87h7xyhu5f.fsf@alphapapa.net> (Adam Porter's message of "Sun, 05 Apr 2020 09:41:32 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246563 Archived-At: Hi Adam, I've looked into the issue. I think the code in bufler.el generting the error reduces to something like: #+BEGIN_SRC elisp ;;; bufler.el -*- lexical-binding: t; -*- (defmacro bufler-defauto-group ()) (eval-and-compile (if 1 (bufler-defauto-group) (bufler-defauto-group))) #+BEGIN_END I think the compiler error is correct because `bufler-defauto-group' is not defined in the compilation environment. You should get the same error from a fresh Emacs instance just byte-compiling. The fix should be to wrap its definition within `eval-and-compile' too. Because the native compiler spawn sub-processes for async compilations it is a little more severe into highlight this tricky issues into the code. Changing topic I have no idea why this instead go through. To me looks like a bug, isn't? #+BEGIN_SRC elisp ;;; bufler.el -*- lexical-binding: t; -*- (defmacro bufler-defauto-group ()) (eval-and-compile (bufler-defauto-group)) #+BEGIN_END Thanks Andrea -- akrl@sdf.org