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: disable automatic native-compilation? Date: Sat, 09 Jul 2022 20:23:27 +0300 Message-ID: <83zghi19ps.fsf@gnu.org> References: <86h73qi62w.fsf@stephe-leake.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38036"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 09 19:25:59 2022 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 1oAEDP-0009gO-BA for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jul 2022 19:25:59 +0200 Original-Received: from localhost ([::1]:60106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAEDN-0003H9-Uo for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jul 2022 13:25:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAEBD-0000mh-Dg for emacs-devel@gnu.org; Sat, 09 Jul 2022 13:23:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46872) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAEBB-0000Mu-Ig; Sat, 09 Jul 2022 13:23:42 -0400 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=MVAldT1vbOpJtlV/hyfV1k3DT8/TbjHmvO20QNP2Kz8=; b=YepOr+9ITveV LL+5VCDRt/uyMePjk0UYmb8+55DsGKMkFY6R06THigIOz96WGKT8V2g4GAA4GpKT9bHSR2DgAcbvj GCX3R7qOxUhdpfz3VvDMz8K8RB5KdClg/Kymamy8eDdeA5Wae32XLBdf9A8TG/YqeTZanCW/RW0mq 9486PFMDAQG77juME4hD+rimr+nYgqHLMsxjDjO1axCL4TXlNmW8LUxXa5rujDcBHm4iPov0aCChb 1AkoKUfJqUOzpTcl5LCiisfwuV0pgqQf+tpVmpiHr/OSNVTb9WyrnCheNLxqWzfdN4CogJaaP68Ie ieEV+JXa+2DSbrWEgu7arA==; Original-Received: from [87.69.77.57] (port=4125 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 1oAEBB-0005NK-2S; Sat, 09 Jul 2022 13:23:41 -0400 In-Reply-To: <86h73qi62w.fsf@stephe-leake.org> (message from Stephen Leake on Sat, 09 Jul 2022 09:49:59 -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" Xref: news.gmane.io gmane.emacs.devel:291997 Archived-At: > From: Stephen Leake > Date: Sat, 09 Jul 2022 09:49:59 -0700 > > I've just started using Emacs 28. I'm trying run the ada-mode test > suite, which lauches a new Emacs instance for each test. > > Now that instance also starts a native-compile process, which slows > things down (a lot), and does not terminate cleanly when the Emacs > instance does at the end of the test. How does it not "terminate cleanly"? what uncleanliness is left? Please do tell the details. > I'm on Windows, so this pops up a dialog that I have to acknowledge > eventually. What dialog did pop up that you needed to acknowledge? what did it say? > The elisp manual section on native compilation does not say how to > disable it. That's because we don't see a need for disabling that, in a build that supports native compilation. The thought was that people who don't want native compilation will build Emacs without it in the first place. > native-comp-deferred-compilation > > The documentation for this variable says: > "If non-nil compile loaded .elc files asynchronously." > > what happens if this is nil? the files are compiled synchronously, or > not at all? You will need to compile them by hand in that case. Automatic native compilation always works asynchronously, because otherwise it would have wedged your session for many seconds, something that is unthinkable. > So, I suggest: > > - There should be a simple way to completely disable native compilation; > Emacs should never do anything that I can't control. I don't necessarily agree. Emacs doesn't do here anything different from what it did before: it loads a compiled Lisp library when you request that. It only compiles it to native code the first time it is loaded when no .eln file exists for it, that's all. But that's a side effect of loading the natively-compiled Lisp that you requested in a build that _you_ built with natively-compilation support. It sounds like you encountered problems in some very special situation, where you are running tests using sub-processes, and your test suite was not ready for native-compilation. So I'm not sure we should draw far-fetching conclusion from your use case. But whether this impression of mine is correct can only be established by discussing the details of your scenario, which you didn't provide. I suggest to submit a detailed bug report. > If setting native-comp-deferred-compilation nil is the right way to > do this, it should be documented in the native compilation section > of the elisp manual. That variable is not a user variable, it exists for internal use purposes. The ELisp manual does document how to disable native-compilation of a specific file (similarly to how you disable byte-compilation of a file). > - When native-comp-available-p returns nil, there should be no errors > about libgccjit Please tell the details and present a reproducible recipe (preferably in a bug report), then we can discuss what happens in that specific situation. In general, you are not supposed to override that function unless you know what you are doing.