GNU bug report logs - #47169
28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users

Previous Next

Package: emacs;

Reported by: Mauricio Collares <mauricio <at> collares.org>

Date: Mon, 15 Mar 2021 17:36:02 UTC

Severity: normal

Found in version 28.0.50

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47169 in the body.
You can then email your comments to 47169 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47169; Package emacs. (Mon, 15 Mar 2021 17:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mauricio Collares <mauricio <at> collares.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 15 Mar 2021 17:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mauricio Collares <mauricio <at> collares.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte
 when batch-native-compiling is confusing to users
Date: Mon, 15 Mar 2021 14:34:51 -0300
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47169; Package emacs. (Mon, 15 Mar 2021 20:16:02 GMT) Full text and rfc822 format available.

Message #8 received at 47169 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Mauricio Collares <mauricio <at> collares.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 47169 <at> debbugs.gnu.org
Subject: Re: 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
Mauricio Collares <mauricio <at> collares.org> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47169; Package emacs. (Tue, 16 Mar 2021 03:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 47169 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: mauricio <at> collares.org, 47169 <at> debbugs.gnu.org
Subject: Re: bug#47169: 28.0.50; [feature/native-comp]
 native-compiler-error-empty-byte when batch-native-compiling is confusing
 to users
Date: Tue, 16 Mar 2021 05:26:08 +0200
> From: Andrea Corallo <akrl <at> sdf.org>
> Cc: 47169 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> Date: Mon, 15 Mar 2021 20:14:55 +0000
> 
> 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?

I agree.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47169; Package emacs. (Tue, 16 Mar 2021 08:28:16 GMT) Full text and rfc822 format available.

Message #14 received at 47169 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mauricio <at> collares.org, 47169 <at> debbugs.gnu.org
Subject: Re: bug#47169: 28.0.50; [feature/native-comp]
 native-compiler-error-empty-byte when batch-native-compiling is confusing
 to users
Date: Tue, 16 Mar 2021 08:27:03 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Andrea Corallo <akrl <at> sdf.org>
>> Cc: 47169 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>> Date: Mon, 15 Mar 2021 20:14:55 +0000
>> 
>> 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?
>
> I agree.

Okay f3abb17118 should implement this.

Mauricio could you try if this works for you?

Thanks

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47169; Package emacs. (Tue, 16 Mar 2021 17:18:01 GMT) Full text and rfc822 format available.

Message #17 received at 47169 <at> debbugs.gnu.org (full text, mbox):

From: Mauricio Collares <mauricio <at> collares.org>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 47169 <at> debbugs.gnu.org
Subject: Re: bug#47169: 28.0.50; [feature/native-comp]
 native-compiler-error-empty-byte when batch-native-compiling is confusing
 to users
Date: Tue, 16 Mar 2021 14:17:00 -0300
Andrea Corallo <akrl <at> sdf.org> writes:
>
> Okay f3abb17118 should implement this.
>
> Mauricio could you try if this works for you?

Hi Andrea,

Thanks for taking a look at this! Making no-byte-compile imply
no-native-compile is a good idea. However, I think the bug is still
present: I just tested f3abb17118 by running batch-native-compile on a
file whose first line is ";;; -*- no-byte-compile: t -*-", and I still
see native-compiler-error-empty-byte being signaled.

Best,
Mauricio




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47169; Package emacs. (Tue, 16 Mar 2021 18:05:01 GMT) Full text and rfc822 format available.

Message #20 received at 47169 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Mauricio Collares <mauricio <at> collares.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 47169 <at> debbugs.gnu.org
Subject: Re: bug#47169: 28.0.50; [feature/native-comp]
 native-compiler-error-empty-byte when batch-native-compiling is confusing
 to users
Date: Tue, 16 Mar 2021 18:04:13 +0000
Mauricio Collares <mauricio <at> collares.org> writes:

> Andrea Corallo <akrl <at> sdf.org> writes:
>>
>> Okay f3abb17118 should implement this.
>>
>> Mauricio could you try if this works for you?
>
> Hi Andrea,
>
> Thanks for taking a look at this! Making no-byte-compile imply
> no-native-compile is a good idea. However, I think the bug is still
> present: I just tested f3abb17118 by running batch-native-compile on a
> file whose first line is ";;; -*- no-byte-compile: t -*-", and I still
> see native-compiler-error-empty-byte being signaled.

Hi Mauricio,

sorry for the sloppy/untested patch, 3e133cc050 works for me please have
a try.

Thanks

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47169; Package emacs. (Tue, 16 Mar 2021 21:39:02 GMT) Full text and rfc822 format available.

Message #23 received at 47169 <at> debbugs.gnu.org (full text, mbox):

From: Mauricio Collares <mauricio <at> collares.org>
To: Andrea Corallo <akrl <at> sdf.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 47169 <at> debbugs.gnu.org
Subject: Re: bug#47169: 28.0.50; [feature/native-comp]
 native-compiler-error-empty-byte when batch-native-compiling is confusing
 to users
Date: Tue, 16 Mar 2021 18:38:19 -0300
Andrea Corallo <akrl <at> sdf.org> writes:
>
> Hi Mauricio,
>
> sorry for the sloppy/untested patch, 3e133cc050 works for me please have
> a try.

Hi Andrea,

I can confirm that I no longer see native-compiler-error-empty-byte
being signaled in such cases. Many thanks for the fix!

Best,
Mauricio




Reply sent to Andrea Corallo <akrl <at> sdf.org>:
You have taken responsibility. (Tue, 16 Mar 2021 21:47:02 GMT) Full text and rfc822 format available.

Notification sent to Mauricio Collares <mauricio <at> collares.org>:
bug acknowledged by developer. (Tue, 16 Mar 2021 21:47:03 GMT) Full text and rfc822 format available.

Message #28 received at 47169-done <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Mauricio Collares <mauricio <at> collares.org>
Cc: 47169-done <at> debbugs.gnu.org
Subject: Re: bug#47169: 28.0.50; [feature/native-comp]
 native-compiler-error-empty-byte when batch-native-compiling is confusing
 to users
Date: Tue, 16 Mar 2021 21:46:38 +0000
Mauricio Collares <mauricio <at> collares.org> writes:

> Andrea Corallo <akrl <at> sdf.org> writes:
>>
>> Hi Mauricio,
>>
>> sorry for the sloppy/untested patch, 3e133cc050 works for me please have
>> a try.
>
> Hi Andrea,
>
> I can confirm that I no longer see native-compiler-error-empty-byte
> being signaled in such cases. Many thanks for the fix!

Super, thanks for reporting.

Closing, thanks!

  Andrea





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Apr 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.