From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#44676: [PATCH 1/4] Support native compilation of packages on install Date: Fri, 20 Nov 2020 08:55:58 +0000 Message-ID: References: Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26257"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44676@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 20 09:58:23 2020 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 1kg2FL-0006jk-HW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Nov 2020 09:58:23 +0100 Original-Received: from localhost ([::1]:39478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kg2FK-0002Dk-GW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Nov 2020 03:58:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kg2D5-0000Ej-B9 for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2020 03:56:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kg2D4-0002sz-GL for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2020 03:56:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kg2D4-0002tb-FK for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2020 03:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Nov 2020 08:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44676 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 44676-submit@debbugs.gnu.org id=B44676.160586256111124 (code B ref 44676); Fri, 20 Nov 2020 08:56:02 +0000 Original-Received: (at 44676) by debbugs.gnu.org; 20 Nov 2020 08:56:01 +0000 Original-Received: from localhost ([127.0.0.1]:42023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kg2D3-0002tM-FA for submit@debbugs.gnu.org; Fri, 20 Nov 2020 03:56:01 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:52166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kg2D1-0002tC-O2 for 44676@debbugs.gnu.org; Fri, 20 Nov 2020 03:56:00 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 0AK8tw53009957; Fri, 20 Nov 2020 08:55:58 GMT In-Reply-To: (Stefan Kangas's message of "Thu, 19 Nov 2020 14:34:52 -0800") 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:193773 Archived-At: Stefan Kangas writes: > From 5c7e414f99962a9e1481a1311fa967f3c7df4b69 Mon Sep 17 00:00:00 2001 > From: Stefan Kangas > Date: Thu, 19 Nov 2020 22:10:20 +0100 > Subject: [PATCH 1/4] compile-async: Don't error out if late loading after > normal load > > * lisp/emacs-lisp/comp.el (native-compile-async): Update > comp-files-queue when an explicit late load is specified. (Bug#44676) > --- > lisp/emacs-lisp/comp.el | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el > index cc5922c61c..a9a07535a4 100644 > --- a/lisp/emacs-lisp/comp.el > +++ b/lisp/emacs-lisp/comp.el > @@ -3511,14 +3511,12 @@ native-compile-async > (list "Path not a file nor directory" path))))) > (dolist (file files) > (if-let ((entry (cl-find file comp-files-queue :key #'car :test #'string=))) > - ;; When no load is specified (plain async compilation) we > - ;; consider valid the one previously queued, otherwise we > - ;; check for coherence (bug#40602). > - (cl-assert (or (null load) > - (eq load (cdr entry))) > - nil "Trying to queue %s with LOAD %s but this is already \ > -queued with LOAD %" > - file load (cdr entry)) > + ;; Most likely the byte-compiler has requested a late load, I'd mention "deferred compilation" in place of "byte-compiler" as I believe is more accurate. This is the mechanism that triggers it and also the customize that controls it. > + ;; so update `comp-files-queue' to reflect that. > + (unless (or (null load) > + (eq load (cdr entry))) > + (cl-substitute (cons file load) (car entry) comp-files-queue > + :key #'car :test #'string=)) > ;; Make sure we are not already compiling `file' (bug#40838). > (unless (or (gethash file comp-async-compilations) > ;; Also exclude files from deferred compilation if > -- > 2.29.2 LGTM, okay with that nit. Thanks Andrea