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#44813: 28.0.50; [feature/native-comp] Recent change to native-compile-async Date: Mon, 23 Nov 2020 10:02:41 +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="5172"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44813@debbugs.gnu.org To: Andrew Whatson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 11:03:13 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 1kh8gj-0001DI-B1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 11:03:13 +0100 Original-Received: from localhost ([::1]:59166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kh8gi-0000Mn-5y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 05:03:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kh8gZ-0000MO-87 for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 05:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kh8gY-0007Jp-Bn for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 05:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kh8gY-0005pz-8c for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 05:03: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: Mon, 23 Nov 2020 10:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44813 X-GNU-PR-Package: emacs Original-Received: via spool by 44813-submit@debbugs.gnu.org id=B44813.160612576622416 (code B ref 44813); Mon, 23 Nov 2020 10:03:02 +0000 Original-Received: (at 44813) by debbugs.gnu.org; 23 Nov 2020 10:02:46 +0000 Original-Received: from localhost ([127.0.0.1]:49043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kh8gI-0005pU-8y for submit@debbugs.gnu.org; Mon, 23 Nov 2020 05:02:46 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:55972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kh8gE-0005pJ-9Z for 44813@debbugs.gnu.org; Mon, 23 Nov 2020 05:02:44 -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 0ANA2fjQ000879; Mon, 23 Nov 2020 10:02:41 GMT In-Reply-To: (Andrew Whatson's message of "Mon, 23 Nov 2020 19:30:07 +1000") 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:193902 Archived-At: Andrew Whatson writes: > Andrea Corallo wrote: >> >> I think straight should call `async-native-compile' with the load >> parameter set to nil and perform the conventional byte compilation. >> >> In case the late load will prove to be necessary (bytecode is loaded >> before native compilation has finished) should be set automatically by >> the existent machinery. > > Ok great, that is much easier. > >> I think would be nicer to add like a selector parameter to >> `async-native-compile', this being a regexp to be satisfied for >> compilation. >> >> The reason why we rely on `comp-deferred-compilation-black-list' for >> deferred compilation is that the user indeed does not invoke a function >> as this happen automatically. >> >> So the proposal would be to have like: >> >> `(defun native-compile-async (paths &optional recursively load selector)` >> >> WDYT? > > Most users will be running with `comp-deferred-compilation` enabled, > even when using a package manager that pre-compiles their packages. > Using a selector to exclude files from the pre-compilation step won't > prevent them from being compiled later with deferred loading. > Straight has a `no-native-compile` option for package recipes to > explicitly prevent their compilation, and the deferred compilation > blacklist is the only way we can ensure this behaviour. It's also > possible that a user has added their own entries to the blacklist and > would expect straight to respect those entries when compiling > packages. > > I agree that the selector is an improvement to the recursive > compilation API, but in straight's case we would just use a selector > which checked against `comp-deferred-compilation-black-list`. This > solution would still allow people to call `native-compile-async` > directly to bypass the blacklist, which might be desirable. If you're > happy with this outcome, I think it's acceptable. Sounds like a plane, only two details: - I'd prefer to have this selector parameter as a single regexp (not a list of regexps), as an interface for a function looks cleaner to me. - I'd like to rename `comp-deferred-compilation-black-list' into `comp-deferred-compilation-deny-list'. I'm not the ugest fan of these renames but OTOH IMO not doing that before merging wouldn't feel correct. Sounds good? Thanks Andrea