From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Enabling native compilation by default when libgccjit is present Date: Wed, 08 Dec 2021 16:31:10 +0200 Message-ID: <83ee6nw4lt.fsf@gnu.org> References: <87czmdqpv9.fsf@web.de> <83h7bo7rvz.fsf@gnu.org> <87bl1tjage.fsf@web.de> <83fsr4zfl2.fsf@gnu.org> <87y24vvnnk.fsf@web.de> <875yrzg6o4.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32037"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, michael_heerdegen@web.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 08 15:32:11 2021 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 1muxzK-0007v4-0Q for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 15:32:06 +0100 Original-Received: from localhost ([::1]:51814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muxzI-0008U6-Tm for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 09:32:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muxyj-0007oP-JH for emacs-devel@gnu.org; Wed, 08 Dec 2021 09:31:29 -0500 Original-Received: from [2001:470:142:3::e] (port=60568 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muxyj-00033Q-2s; Wed, 08 Dec 2021 09:31:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VpxYVtD9Qlnr7rNho3GkATmCLGyaD2F5rCgfuhT0SMY=; b=HPmeqwJXDoWv XWMONwGLb0QkOYQqoAqTQlqbmIrsdkxgN+K542WbXKY56p6joqcQGmv8l4XoZg4rIv3vvYAugi3CV dpQHuFxM5Kn5bASql5cie0XA46Voqnu/XiG1LbwwleQJXP2jzyL9k7iXTfEXTB4CpRuEB657g8hNg XDhWvuwYshkHVqRt9RfgR/EShrZgmm5aQAKSTBKcFCyN953TqwCn6gys8yRjdEyWrV8chKBoWv+Y8 19oiXxfHpzLQilSLWazYR1TrP1v+J1Wh7E+WortjCywNBAN4lWMf+DHFDdkhGCoEtNWOrTiAUN8tT vryXc2HbZIdeXOwiMaS43w==; Original-Received: from [87.69.77.57] (port=2662 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muxyi-0001aA-S5; Wed, 08 Dec 2021 09:31:29 -0500 In-Reply-To: (message from Stefan Monnier on Wed, 08 Dec 2021 08:52:01 -0500) 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" Xref: news.gmane.io gmane.emacs.devel:281359 Archived-At: > From: Stefan Monnier > Cc: Michael Heerdegen , Eli Zaretskii > , emacs-devel@gnu.org > Date: Wed, 08 Dec 2021 08:52:01 -0500 > > > But how are those warnings different from what the user will get if he > > runs `package-install' on a package that causes warnings from the > > byte-compiler? > > - By default, package-install compiles all the new files, one after the > other, in the current Emacs session. So it tends to emit fewer > warnings than the native compilation (which compiles each file in > a fresh new process) because many more packages have already been > loaded. This same difference can cause the native-compiled files to > be miscompiled (because of a lack of `require`s) while the .elc files > generated during `package-install` work properly. > > - Native compilation of a package kicks in when a package that has been > byte-compiled gets loaded in an Emacs session. > So the warnings emitted by native-compilation are always *in addition* > to the warnings that were emitted during `package-install`. > > - `.eln` files are specific to a particular Emacs executable, so all the > `.elc` files you use will be *re*compiled to `.eln` every time you > start using a new Emacs executable. For "normal" users this means > every time they upgrade to a new release. For people who track > `master` it can mean "every other day". There's no argument that there are more warnings with native-compilation. The argument is whether these warnings should surprise people as something that "never happens otherwise".