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#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users Date: Mon, 15 Mar 2021 20:14:55 +0000 Message-ID: References: <871rcgiamc.fsf@collares.org> 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="28329"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , 47169@debbugs.gnu.org To: Mauricio Collares Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 15 21:18:30 2021 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 1lLtfa-0007FO-PI for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Mar 2021 21:18:30 +0100 Original-Received: from localhost ([::1]:54372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLtfZ-0007YQ-Nh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Mar 2021 16:18:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLtdC-0004SV-JK for bug-gnu-emacs@gnu.org; Mon, 15 Mar 2021 16:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLtdC-0007tF-Al for bug-gnu-emacs@gnu.org; Mon, 15 Mar 2021 16:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLtdC-0008HR-5W for bug-gnu-emacs@gnu.org; Mon, 15 Mar 2021 16:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Mar 2021 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47169 X-GNU-PR-Package: emacs Original-Received: via spool by 47169-submit@debbugs.gnu.org id=B47169.161583930431753 (code B ref 47169); Mon, 15 Mar 2021 20:16:02 +0000 Original-Received: (at 47169) by debbugs.gnu.org; 15 Mar 2021 20:15:04 +0000 Original-Received: from localhost ([127.0.0.1]:37274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLtcG-0008G5-2H for submit@debbugs.gnu.org; Mon, 15 Mar 2021 16:15:04 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:53677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLtcD-0008FO-DK for 47169@debbugs.gnu.org; Mon, 15 Mar 2021 16:15:03 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 12FKEtS9008256 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 15 Mar 2021 20:14:55 GMT In-Reply-To: <871rcgiamc.fsf@collares.org> (Mauricio Collares's message of "Mon, 15 Mar 2021 14:34:51 -0300") 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:202429 Archived-At: Mauricio Collares writes: > Some packages contain valid .el files such that batch-byte-compiling > them does not produce an .elc file, for example because they set > "no-byte-compile" to t. Running batch-byte-compile on such a file exits > successfully (without outputting any .elc file, of course) but running > batch-native-compile exits with native-compiler-error-empty-byte. > > In the Nix package manager, we native-compile packages at installation > time, and we do so by calling batch-native-compile for each .el file in > the package separately. So in our use case .el files as described above > shouldn't trigger error messages. We can work around this on the Nix > side, but I was wondering if it would be better to turn the error into a > warning (or even not emit a warning at all, since technically everything > went well). > > Step to reproduce: batch-native-compile a file that sets no-byte-compile > to t. > > (Reporting this on behalf of a user, see > https://github.com/nix-community/emacs-overlay/issues/120) > > Best, > Mauricio Hi Mauricio, thanks for the report. I think we have two option: 1- Assume that `no-byte-compile' implies also `no-native-compile' so that we don't produce the .eln and we don't complain when `no-byte-compile' is non-nil. 2- Manually add `no-native-compile' to all files we don't want to be compiled. I'll vote for 1, Eli WDYT? Thanks Andrea