GNU bug report logs -
#24359
25.1; batch-byte-compile exits with code 0 even if errors occurred
Previous Next
Reported by: Philipp <p.stephani2 <at> gmail.com>
Date: Sat, 3 Sep 2016 17:29:02 UTC
Severity: normal
Tags: fixed
Merged with 23495,
24360
Found in version 25.1
Fixed in version 26
Done: npostavs <at> users.sourceforge.net
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 24359 in the body.
You can then email your comments to 24359 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sat, 03 Sep 2016 17:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Philipp <p.stephani2 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 03 Sep 2016 17:29:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Create a file /tmp/a.el with the following content:
;;; -*- lexical-binding: t; -*-
(let (a)
(add-to-list 'a t))
Then run:
$ emacs -batch -Q -f batch-byte-compile /tmp/a.el ; echo $?
In toplevel form:
/tmp/a.el:2:1:Error: ‘add-to-list’ can’t use lexical var ‘a’; use ‘push’ or
‘cl-pushnew’
0
Expected behavior: The status code is nonzero because an error occurred.
Actual behavior: The status code is zero.
This is because this class of error (and others) use
byte-compile-log-warning, which doesn't properly set the error flag.
In GNU Emacs 25.1.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
of 2016-09-03 built on unknown
Repository revision: 803ad6f7e7a9c6bcf8a6cbf8eaad17501b114a33
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description: Ubuntu 14.04 LTS
Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)
Memory information:
((conses 16 87400 6705)
(symbols 48 19696 0)
(miscs 40 300 146)
(strings 32 14554 3984)
(string-bytes 1 425298)
(vectors 16 11995)
(vector-slots 8 435911 5924)
(floats 8 162 31)
(intervals 56 184 0)
(buffers 976 22)
(heap 1024 35418 1075))
Merged 23495 24359.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sat, 03 Sep 2016 17:37:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sat, 03 Sep 2016 18:46:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 24359 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I've attached a patch for the two byte compilation bugs.
[Message part 2 (text/html, inline)]
[0001-Stop-calling-byte-compile-log-warning.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 04 Sep 2016 07:34:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 24359 <at> debbugs.gnu.org (full text, mbox):
Pardon me this technical question: Receiving this in Thunderbird (on
Windows XP) gets me:
From: Philipp Stephani <phst <at> google.com>
Date: Sat, 3 Sep 2016 20:37:47 +0200
Subject: [PATCH] =?UTF-8?q?Stop=20calling=20=E2=80=98byte-compile-log-warn?=
=?UTF-8?q?ing=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For errors, use ‘byte-compile-report-error’ instead so that the error
is registered and causes compilation to fail (Bug#24359).
For warnings, use ‘byte-compile-warn’ instead so that
‘byte-compile-error-on-warn’ is honored (Bug#24360).
What do I have to do to see the '`'...'´' correctly?
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 04 Sep 2016 08:46:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 24359 <at> debbugs.gnu.org (full text, mbox):
On Sep 04 2016, martin rudalics <rudalics <at> gmx.at> wrote:
> Pardon me this technical question: Receiving this in Thunderbird (on
> Windows XP) gets me:
>
>
> From: Philipp Stephani <phst <at> google.com>
> Date: Sat, 3 Sep 2016 20:37:47 +0200
> Subject: [PATCH] =?UTF-8?q?Stop=20calling=20=E2=80=98byte-compile-log-warn?=
> =?UTF-8?q?ing=E2=80=99?=
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> For errors, use ‘byte-compile-report-error’ instead so that the error
> is registered and causes compilation to fail (Bug#24359).
>
> For warnings, use ‘byte-compile-warn’ instead so that
> ‘byte-compile-error-on-warn’ is honored (Bug#24360).
>
>
>
> What do I have to do to see the '`'...'´' correctly?
You can pass it directly to git am.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 04 Sep 2016 08:58:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 24359 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Seems Inbox generates an incorrect header for the attachment:
Content-Type: text/x-patch; charset=US-ASCII
The following would be more appropriate:
Content-Type: text/plain; charset=UTF-8
I've reported this; sorry for the trouble. You should be able to correctly
see the patch by downloading it an opening the file in Emacs.
martin rudalics <rudalics <at> gmx.at> schrieb am So., 4. Sep. 2016 um 09:33 Uhr:
> Pardon me this technical question: Receiving this in Thunderbird (on
> Windows XP) gets me:
>
>
> From: Philipp Stephani <phst <at> google.com>
> Date: Sat, 3 Sep 2016 20:37:47 +0200
> Subject: [PATCH]
> =?UTF-8?q?Stop=20calling=20=E2=80=98byte-compile-log-warn?=
> =?UTF-8?q?ing=E2=80=99?=
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> For errors, use ‘byte-compile-report-error’ instead so that the error
> is registered and causes compilation to fail (Bug#24359).
>
> For warnings, use ‘byte-compile-warn’ instead so that
> ‘byte-compile-error-on-warn’ is honored (Bug#24360).
>
>
>
> What do I have to do to see the '`'...'´' correctly?
>
> martin
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 04 Sep 2016 09:36:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 24359 <at> debbugs.gnu.org (full text, mbox):
>> From: Philipp Stephani <phst <at> google.com>
>> Date: Sat, 3 Sep 2016 20:37:47 +0200
>> Subject: [PATCH] =?UTF-8?q?Stop=20calling=20=E2=80=98byte-compile-log-warn?=
>> =?UTF-8?q?ing=E2=80=99?=
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> For errors, use ‘byte-compile-report-error’ instead so that the error
>> is registered and causes compilation to fail (Bug#24359).
>>
>> For warnings, use ‘byte-compile-warn’ instead so that
>> ‘byte-compile-error-on-warn’ is honored (Bug#24360).
>>
>>
>>
>> What do I have to do to see the '`'...'´' correctly?
>
> You can pass it directly to git am.
Yes. But I wonder why Thunderbird does not handle that. IIUC
there's nothing fishy in the headers above.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 04 Sep 2016 09:36:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 24359 <at> debbugs.gnu.org (full text, mbox):
> Seems Inbox generates an incorrect header for the attachment:
>
> Content-Type: text/x-patch; charset=US-ASCII
>
> The following would be more appropriate:
>
> Content-Type: text/plain; charset=UTF-8
But what I see is the latter. I'm afraid there's some internal setting
that confuses Thunderbird.
> I've reported this; sorry for the trouble. You should be able to correctly
> see the patch by downloading it an opening the file in Emacs.
Sure. No problems in this regard.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 04 Sep 2016 10:41:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 24359 <at> debbugs.gnu.org (full text, mbox):
On Sep 04 2016, martin rudalics <rudalics <at> gmx.at> wrote:
>> Seems Inbox generates an incorrect header for the attachment:
>>
>> Content-Type: text/x-patch; charset=US-ASCII
>>
>> The following would be more appropriate:
>>
>> Content-Type: text/plain; charset=UTF-8
>
> But what I see is the latter. I'm afraid there's some internal setting
> that confuses Thunderbird.
The former is part of the attachment header. You can only see it in the
raw message.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 04 Sep 2016 11:23:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 24359 <at> debbugs.gnu.org (full text, mbox):
>>> Seems Inbox generates an incorrect header for the attachment:
>>>
>>> Content-Type: text/x-patch; charset=US-ASCII
>>>
>>> The following would be more appropriate:
>>>
>>> Content-Type: text/plain; charset=UTF-8
>>
>> But what I see is the latter. I'm afraid there's some internal setting
>> that confuses Thunderbird.
>
> The former is part of the attachment header. You can only see it in the
> raw message.
I can see it now. Thank you.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 04 Sep 2016 21:08:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 24359 <at> debbugs.gnu.org (full text, mbox):
There was some suggestion in #23495 (to which I've merged this bug) that
it may have been on purpose, but no confirmation of that, and it doesn't
really make sense to me, so I think your patch is a good idea.
Philipp Stephani <p.stephani2 <at> gmail.com> writes:
>
> * lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled)
> (macroexp--warn-and-return): Use ‘byte-compile-warn’ instead of
> ‘byte-compile-log-warning’.
>
> * lisp/emacs-lisp/bytecomp.el (byte-compile-form, byte-compile-unfold-bcf)
> (byte-compile-setq, byte-compile-funcall): Use
> ‘byte-compile-report-error’ instead of ‘byte-compile-log-warning’.
[...]
> * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use)
> (cconv--analyze-function, cconv-analyze-form): Use
> ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
>
> * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Use
> ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
>
> * lisp/subr.el (add-to-list): Use ‘byte-compile-report-error’ instead
> of ‘byte-compile-log-warning’.
> (do-after-load-evaluation): Use ‘byte-compile-warn’ instead of
> ‘byte-compile-log-warning’.
I think you can combine all these into one entry.
> (defun byte-compile-log-warning (string &optional fill level)
> + "Log a message STRING in `byte-compile-log-buffer'.
> +Also log the current function and file if not already done. If
> +FILL is non-nil, set ‘warning-fill-prefix’ to four spaces. LEVEL
Docstrings should use `', which will be converted to ‘’ upon display.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 11 Sep 2016 16:06:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 24359 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
<npostavs <at> users.sourceforge.net> schrieb am So., 4. Sep. 2016 um 23:07 Uhr:
>
> There was some suggestion in #23495 (to which I've merged this bug) that
> it may have been on purpose, but no confirmation of that, and it doesn't
> really make sense to me, so I think your patch is a good idea.
>
Thanks. Since nobody complained or provided arguments for the current
behavior, I've pushed it to master.
>
> Philipp Stephani <p.stephani2 <at> gmail.com> writes:
> >
> > * lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled)
> > (macroexp--warn-and-return): Use ‘byte-compile-warn’ instead of
> > ‘byte-compile-log-warning’.
> >
> > * lisp/emacs-lisp/bytecomp.el (byte-compile-form,
> byte-compile-unfold-bcf)
> > (byte-compile-setq, byte-compile-funcall): Use
> > ‘byte-compile-report-error’ instead of ‘byte-compile-log-warning’.
> [...]
> > * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use)
> > (cconv--analyze-function, cconv-analyze-form): Use
> > ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
> >
> > * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Use
> > ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
> >
> > * lisp/subr.el (add-to-list): Use ‘byte-compile-report-error’ instead
> > of ‘byte-compile-log-warning’.
> > (do-after-load-evaluation): Use ‘byte-compile-warn’ instead of
> > ‘byte-compile-log-warning’.
>
> I think you can combine all these into one entry.
>
I wouldn't know how, as they are for different files, and AFAIK the
changelog format doesn't allow combining messages across files.
>
> > (defun byte-compile-log-warning (string &optional fill level)
> > + "Log a message STRING in `byte-compile-log-buffer'.
> > +Also log the current function and file if not already done. If
> > +FILL is non-nil, set ‘warning-fill-prefix’ to four spaces. LEVEL
>
> Docstrings should use `', which will be converted to ‘’ upon display.
>
Done.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sun, 11 Sep 2016 16:37:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 24359 <at> debbugs.gnu.org (full text, mbox):
Philipp Stephani <p.stephani2 <at> gmail.com> writes:
> Philipp Stephani <p.stephani2 <at> gmail.com> writes:
> >
> > * lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled)
> > (macroexp--warn-and-return): Use ‘byte-compile-warn’ instead of
> > ‘byte-compile-log-warning’.
> >
> > * lisp/emacs-lisp/bytecomp.el (byte-compile-form, byte-compile-unfold-bcf)
> > (byte-compile-setq, byte-compile-funcall): Use
> > ‘byte-compile-report-error’ instead of ‘byte-compile-log-warning’.
> [...]
> > * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use)
> > (cconv--analyze-function, cconv-analyze-form): Use
> > ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
> >
> > * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Use
> > ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
> >
> > * lisp/subr.el (add-to-list): Use ‘byte-compile-report-error’ instead
> > of ‘byte-compile-log-warning’.
> > (do-after-load-evaluation): Use ‘byte-compile-warn’ instead of
> > ‘byte-compile-log-warning’.
>
> I think you can combine all these into one entry.
>
> I wouldn't know how, as they are for different files, and AFAIK the changelog format doesn't allow combining messages across files.
Just put them together like entries in the same file, e.g.
* lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled)
(macroexp--warn-and-return):
* lisp/emacs-lisp/bytecomp.el (byte-compile-form, byte-compile-unfold-bcf)
(byte-compile-setq, byte-compile-funcall): Use
‘byte-compile-report-error’ and ‘byte-compile-warn’ instead of
‘byte-compile-log-warning’.
Another example is in 6acff252:
* src/window.c (window_scroll_pixel_based):
* src/xdisp.c (pos_visible_p): Don't allow simulated redisplay to
start outside the accessible portion of the buffer. This avoids
assertion violations when some Lisp narrows the buffer to less
than the current window, and then attempts to scroll the buffer.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24359
; Package
emacs
.
(Sat, 08 Oct 2016 23:53:01 GMT)
Full text and
rfc822 format available.
Message #43 received at 24359 <at> debbugs.gnu.org (full text, mbox):
merge 24359 24360
tags 24359 fixed
close 24359 26
quit
Philipp Stephani <p.stephani2 <at> gmail.com> writes:
> <npostavs <at> users.sourceforge.net> schrieb am So., 4. Sep. 2016 um 23:07 Uhr:
>
> There was some suggestion in #23495 (to which I've merged this bug) that
> it may have been on purpose, but no confirmation of that, and it doesn't
> really make sense to me, so I think your patch is a good idea.
>
> Thanks. Since nobody complained or provided arguments for the current behavior, I've pushed it to master.
Closing as fixed.
Added tag(s) fixed.
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sat, 08 Oct 2016 23:53:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 26, send any further explanations to
24359 <at> debbugs.gnu.org and Philipp <p.stephani2 <at> gmail.com>
Request was from
npostavs <at> users.sourceforge.net
to
control <at> debbugs.gnu.org
.
(Sat, 08 Oct 2016 23:53:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 06 Nov 2016 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.