From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: Native compilation on as default? Date: Wed, 25 Oct 2023 17:33:03 -0400 Message-ID: References: <83legs281v.fsf@gnu.org> <83r0liiy44.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33837"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 25 23:33:58 2023 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 1qvlVm-0008cj-Lf for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Oct 2023 23:33:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvlUv-0007cz-WB; Wed, 25 Oct 2023 17:33:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvlUu-0007cI-7Z for emacs-devel@gnu.org; Wed, 25 Oct 2023 17:33:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvlUt-0000nD-Nh; Wed, 25 Oct 2023 17:33:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=T1Uf3mXz2XpZbqa65OsgHutBCuSQHKjD50k6TT8hYoA=; b=LT2PoQMvYujhSiaEN0r7 7Iz7jLBjVJq5KLdQUOQc3PjkE7OrTleIc2pmf/8JPQi/QJ/FUtfuFBPwps1CBu2Ai7C0RG8ACrqzv Qybt/JOIUYdav+x/XoSXrxbdAr0UGCaBa5W8eqJ4YPyLjj++DLsmUQv1bgZSZF+EbRpIqOGIBcyZx 9QSVDWA3CEP6ShjXUm+e8kc6h5R6vSaVPriETJQP0ubU87BOFAl1p7ROGRgs7IuulhoWfiDwRA2Zm urHNH9kX1pXfoK2lf1szBM80garBuIYGP9jiVq0T5B57Ju/fdfh7iJOp/P/bsCJ/VnWpGPOwGqpE8 rkM6cugGx/lvXw==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qvlUt-0007wP-GM; Wed, 25 Oct 2023 17:33:03 -0400 In-Reply-To: (Stefan Kangas's message of "Wed, 25 Oct 2023 14:22:31 -0700") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311867 Archived-At: Stefan Kangas writes: > Andrea Corallo writes: > >> Thinking about this... IME *the* warning we are interested in from the >> async compilation is the: >> >> "the function =E2=80=98xxx=E2=80=99 is not known to be defined." >> >> This because typically xxx is not a function but a macro and is unknown >> due to a missing require, the file end-up misscompiled and not >> functional. > > What is it specifically that makes this into a separate issue for the > native-compiler? Shouldn't the byte-compiler also warn about a > situation like that? Hi Stefan, doing some work I just re-discovered that a good a explaination of that was written by Eli in the 'native-comp-async-report-warnings-errors' doc :) " When native compilation happens asynchronously, it can produce warnings and errors, some of which might not be emitted by a byte-compilation. The typical case for that is native-compiling a file that is missing some =E2=80=98require=E2=80=99 of a necessary featur= e, while having it already loaded into the environment when byte-compiling. As asynchronous native compilation always starts from a pristine environment, it is more sensitive to such omissions, and might be unable to compile such Lisp source files correctly. " Essentially if in Emacs one has for any reason the definition of the macro loaded before invoking the byte-compiler, this will not complain even if the require is missing. Bests Andrea