unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users
@ 2021-03-15 17:34 Mauricio Collares
  2021-03-15 20:14 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Mauricio Collares @ 2021-03-15 17:34 UTC (permalink / raw)
  To: 47169


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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users
  2021-03-15 17:34 bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users Mauricio Collares
@ 2021-03-15 20:14 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-03-16  3:26   ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-03-15 20:14 UTC (permalink / raw)
  To: Mauricio Collares; +Cc: Eli Zaretskii, 47169

Mauricio Collares <mauricio@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users
  2021-03-15 20:14 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-03-16  3:26   ` Eli Zaretskii
  2021-03-16  8:27     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-03-16  3:26 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: mauricio, 47169

> From: Andrea Corallo <akrl@sdf.org>
> Cc: 47169@debbugs.gnu.org, Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users
  2021-03-16  3:26   ` Eli Zaretskii
@ 2021-03-16  8:27     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-03-16 17:17       ` Mauricio Collares
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-03-16  8:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: mauricio, 47169

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: 47169@debbugs.gnu.org, Eli Zaretskii <eliz@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users
  2021-03-16  8:27     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-03-16 17:17       ` Mauricio Collares
  2021-03-16 18:04         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Mauricio Collares @ 2021-03-16 17:17 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 47169


Andrea Corallo <akrl@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users
  2021-03-16 17:17       ` Mauricio Collares
@ 2021-03-16 18:04         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-03-16 21:38           ` Mauricio Collares
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-03-16 18:04 UTC (permalink / raw)
  To: Mauricio Collares; +Cc: Eli Zaretskii, 47169

Mauricio Collares <mauricio@collares.org> writes:

> Andrea Corallo <akrl@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users
  2021-03-16 18:04         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-03-16 21:38           ` Mauricio Collares
  2021-03-16 21:46             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Mauricio Collares @ 2021-03-16 21:38 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 47169


Andrea Corallo <akrl@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users
  2021-03-16 21:38           ` Mauricio Collares
@ 2021-03-16 21:46             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 8+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-03-16 21:46 UTC (permalink / raw)
  To: Mauricio Collares; +Cc: 47169-done

Mauricio Collares <mauricio@collares.org> writes:

> Andrea Corallo <akrl@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






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-16 21:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 17:34 bug#47169: 28.0.50; [feature/native-comp] native-compiler-error-empty-byte when batch-native-compiling is confusing to users Mauricio Collares
2021-03-15 20:14 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-16  3:26   ` Eli Zaretskii
2021-03-16  8:27     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-16 17:17       ` Mauricio Collares
2021-03-16 18:04         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-16 21:38           ` Mauricio Collares
2021-03-16 21:46             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).