From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Whatson Newsgroups: gmane.emacs.bugs Subject: bug#44813: 28.0.50; [feature/native-comp] Recent change to native-compile-async Date: Mon, 23 Nov 2020 19:30:07 +1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18455"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44813@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 10:31:14 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 1kh8Bm-0004hJ-6c for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 10:31:14 +0100 Original-Received: from localhost ([::1]:53942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kh8Bl-0001sp-7b for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 04:31:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kh8Bb-0001rh-1P for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 04:31:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kh8Ba-0003j7-3Q for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 04:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kh8Ba-0004ua-0k for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 04:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrew Whatson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 09:31:01 +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.160612382818818 (code B ref 44813); Mon, 23 Nov 2020 09:31:01 +0000 Original-Received: (at 44813) by debbugs.gnu.org; 23 Nov 2020 09:30:28 +0000 Original-Received: from localhost ([127.0.0.1]:48949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kh8B2-0004tS-2O for submit@debbugs.gnu.org; Mon, 23 Nov 2020 04:30:28 -0500 Original-Received: from mail-vs1-f51.google.com ([209.85.217.51]:35978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kh8Ay-0004t7-A2 for 44813@debbugs.gnu.org; Mon, 23 Nov 2020 04:30:26 -0500 Original-Received: by mail-vs1-f51.google.com with SMTP id h185so8776724vsc.3 for <44813@debbugs.gnu.org>; Mon, 23 Nov 2020 01:30:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JiTZuF8afy19fGLwzglE2p7r+TOEikZ7YVGvjyHM2Fs=; b=aYeiq8kRVQzWfiCtTtyygcPJJFOgoYv7wa/FMAMZSjNZUyoUay/rc8PZnwYfDnN/91 xyXg9ylBl1fpF1kyKm8P7jop6zSmzkDEyF5GJOiqZ1Krq6mUbKtx2tavJIOCZHNAgE+M haSH4vvnWMJ5U9HjHv9jy0cy8pgMmUz4jEGW5F628SLyzHJWg5cltctLfEanam9mT5Rb IeJKMg4hVPTfdFZ3C8XE6WVB2DmI/MRG3Og6oqGcvLbXmrkvVZ0gD0HYQD4hxA/SpHfl FlMcDaBKG2p55jGqCvd4LuF7nSZcalO76jUsKzsgobbZy826EBd4fxd3sMubeXQmYUiP Iv6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JiTZuF8afy19fGLwzglE2p7r+TOEikZ7YVGvjyHM2Fs=; b=J8hA5nZjgvpAQ7wKmvQTx2E0qoUzGUZyWoEV3fH95nGiRI+9wLGB13udTfM66AbeDS eNGdT2SC25OqHDqjFjUrvV1N9Vw10+exPanMSNx4rXF1GUXkUyeXCjJrISK/WPcsbVyI AMQPNYePryqi05CeatggDFm5nBcnFWth+3vFMIBhn/KoBaeX//FiuzHIbM+AaJ2jK2ew qR1sWt3H1KMiA5nizZFAe+jsyzunZEB9ydX5S3i7QesGNckT8MyUmOZE4hmaxSZdS9+p fhGlVqKB4RjQKfXNJHkZq/hkc8DuXpr120WsoAWRRcz+X8S0ek/KJXEB0ZDP05WZauvF 4HIA== X-Gm-Message-State: AOAM530XJDwCVD/BzRBIpxa4BQDwSgy0M9izLOm9Ax42ViW1wnK521oh d1+kL1NEzXl87ndmhm6j4JSk1t89xTHGaz/NmJ0= X-Google-Smtp-Source: ABdhPJyjiwfqkLPW+6rvWkAaa6IlelE1otVelDFygaqsC46S6i5smcHR1Dvo5URieq+czT6x38sIVvzUzqde9udvWdE= X-Received: by 2002:a67:1d07:: with SMTP id d7mr596237vsd.33.1606123818640; Mon, 23 Nov 2020 01:30:18 -0800 (PST) In-Reply-To: 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:193900 Archived-At: 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. Thanks!