From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#58509: 29.0.50; Synchronous nativecomp Date: Fri, 14 Oct 2022 12:38:30 +0200 Message-ID: <87a65yd715.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21247"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrea Corallo To: 58509@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 12:39:15 2022 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 1ojI5y-0005Gy-QI for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 12:39:14 +0200 Original-Received: from localhost ([::1]:43614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojI5w-0006K2-Kk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 06:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojI5o-0006HU-Nh for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 06:39:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojI5o-0001B0-5F for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 06:39:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojI5m-0004VC-OP; Fri, 14 Oct 2022 06:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: akrl@sdf.org, bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 10:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58509 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Andrea Corallo Original-Received: via spool by submit@debbugs.gnu.org id=B.166574392817265 (code B ref -1); Fri, 14 Oct 2022 10:39:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Oct 2022 10:38:48 +0000 Original-Received: from localhost ([127.0.0.1]:35846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojI5X-0004UP-OE for submit@debbugs.gnu.org; Fri, 14 Oct 2022 06:38:48 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:57792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojI5R-0004U9-Ab for submit@debbugs.gnu.org; Fri, 14 Oct 2022 06:38:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojI5Q-0005tL-SZ for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 06:38:40 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:34566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojI5O-00018G-Dy for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 06:38:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nPnI5iwTYy5piGFDs12uaQjhN+ncDxxxsMO0XAreLfU=; b=tZjqemBFi0ybILVxzQZENWFCOL DAN561La/rje1iR5+UDkOCRrRtjJyihQA8ABwPIdFFcdwrLVu07EQjbZbPDPIfS36/sMyGuypMIfH Vi8w+X+HzfojBT9Vbu2p+0RwHhhRZIOkisDo28R9+Fkjo5ulmSgzph9T+4bjqIh6cpl8=; Original-Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojI5H-000564-PS for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 12:38:34 +0200 X-Now-Playing: Xeno & Oaklander's _Topiary_: "Palms" Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:245392 Archived-At: I thought I'd open a bug report for something I mentioned elsewhere: It should be possible for --batch Emacsen to do native compilation. I've got a bunch of Elisp scripts, and some of them do a lot of stuff, and it'd be nice if they were native-compiled. This will happen if I also use the same packages interactively, but that often doesn't happen. (And besides, since there's a bunch of different Emacs versions, they won't use the same eln cache anyway.) So I'd like to be able to say "emacs --batch --native-compile -l ..." or something along those lines. However, this also almost requires that we allow the nativecomp to happen synchronously -- the batch job may end before nativecomp finished otherwise, leading to cleanup problems and loss of efficiency. So in this mode, loading an .elc file (with missing .eln file) should instead just trigger .eln generation, and then we load the .eln file. And then perhaps we don't actually have to fork an Emacs to do the .eln generation? We can just do it in the currently running one, leading to further efficiency gains. This is also useful as a general tool for debugging: Today, things aren't really reproducible, because things happen asynchronously and unpredictably. So if we have this, we can also use it as a debugging tool in general, and not just in --batch. In GNU Emacs 29.0.50 (build 144, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-10-13 built on downe Repository revision: cbd04ad3d572850775f18bde868c71abcde733ed Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: Ubuntu 22.04.1 LTS