unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24623: 25.1; Flymake turns off if check command fails without reporting errors in the file being edited
@ 2016-10-04 17:47 Dave Abrahams
  2017-11-03 11:51 ` João Távora
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Abrahams @ 2016-10-04 17:47 UTC (permalink / raw)
  To: 24623


In these lines from flymake-post-syntax-check:

      (if (and (equal 0 err-count) (equal 0 warn-count))
          (if (equal 0 exit-status)
              (flymake-report-status "" "") ; PASSED
            (if (not flymake-check-was-interrupted)
                (flymake-report-fatal-status "CFGERR"
                                             (format "Configuration error has occurred while running %s" command))
              (flymake-report-status nil ""))) ; "STOPPED"
        (flymake-report-status (format "%d/%d" err-count warn-count) "")))))

err-count and warn-count are the count of errors detected *in the file
being edited*.  My syntax check command must consider a whole batch of
files at once, and sometimes those other files have errors in them.
That should not disable syntax checking in the current file, but flymake
has this behavior unconditionally, and there's no way to turn it off.



In GNU Emacs 25.1.2 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21)
 of 2016-08-23 built on Atago.local
Repository revision: 990dafce23a64d86fd6e3fbf5c93d1183fee6082
Windowing system distributor 'Apple Inc.', version 10.12.1
Configured using:
 'configure --with-mac --enable-mac-app=/Users/build/emacs-mac-build
 --prefix=/Users/build/emacs-mac-build'

Configured features:
NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  recentf-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  me-minor-mode: t
  winner-mode: t
  which-function-mode: t
  show-paren-mode: t
  server-mode: t
  ido-everywhere: t
  global-auto-revert-mode: t
  display-time-mode: t
  delete-selection-mode: t
  auto-insert-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mac-mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Wrote /Users/dave/src/s/swift/utils/swift-project-settings.el
Quit [2 times]
Saving file /var/folders/m1/tmpgcrzx4035fts37r89qtxc0000gn/T/swift-gyb24853FRa/!var!folders!m1!tmpgcrzx4035fts37r89qtxc0000gn!T!FloatingPointTypes.swift.gyb-flymake24853Ve1.swift...
Wrote /var/folders/m1/tmpgcrzx4035fts37r89qtxc0000gn/T/swift-gyb24853FRa/!var!folders!m1!tmpgcrzx4035fts37r89qtxc0000gn!T!FloatingPointTypes.swift.gyb-flymake24853Ve1.swift
Making completion list...
Quit
Making completion list...
Mark saved where search started
Mark set
Info-search: Search failed: "flymake"
next-line: End of buffer [3 times]

Load-path shadows:
/Applications/Emacs-25.1.app/Contents/Resources/lisp/progmodes/compile hides ~/.emacs.d/site-lisp/non-GPL3/compile

Features:
(shadow sort emacsbug sendmail network-stream nsm starttls tls gnutls
mail-extr edebug python dabbrev files-x recentf tree-widget pp misearch
multi-isearch eieio-opt speedbar sb-image ezimage dframe debug vc-git
whitespace swift-mode flymake derived gnus-dired swift-project-settings
compile skeleton cc-styles cc-align cc-engine cc-vars cc-defs jka-compr
ffap thingatpt modal elec-pair magit-blame magit-stash magit-bisect
magit-remote magit-commit magit-sequence magit magit-apply magit-wip
magit-log magit-diff smerge-mode diff-mode magit-core magit-autorevert
magit-process magit-popup magit-mode magit-git crm magit-section
magit-utils git-commit log-edit eudc eudc-vars message rfc822 mml
mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util
add-log with-editor async-bytecomp async tramp-sh tramp tramp-compat
tramp-loaddefs trampver shell pcomplete comint ansi-color format-spec
cus-edit+ cl page-ext system-type-darwin-theme disp-table dired-x dired
winner ring which-func imenu paren server ido autorevert filenotify time
delsel autoinsert edmacro kmacro initsplit cus-edit cus-start cus-load
wid-edit find-func elhome use-package diminish bind-key easy-mmode
finder-inf column-enforce-mode-autoloads elhome-autoloads gh-common
gh-profile url-parse auth-source gnus-util mm-util help-fns mail-prsvr
password-cache url-vars rx s ucs-normalize marshal eieio-compat cl-seq
ht json map dash eieio eieio-core cl-macs maxframe-autoloads info advice
package epg-config seq byte-opt gv bytecomp byte-compile cl-extra
help-mode easymenu cconv cl-loaddefs pcase cl-lib mule-util time-date
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel mac-win term/common-win 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 kqueue mac multi-tty
make-network-process emacs)

Memory information:
((conses 16 456311 95214)
 (symbols 48 39232 0)
 (miscs 40 3655 1742)
 (strings 32 99499 16751)
 (string-bytes 1 3696221)
 (vectors 16 65804)
 (vector-slots 8 1947268 182298)
 (floats 8 523 633)
 (intervals 56 8620 2359)
 (buffers 976 72))

-- 
-Dave





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

* bug#24623: 25.1; Flymake turns off if check command fails without reporting errors in the file being edited
  2016-10-04 17:47 bug#24623: 25.1; Flymake turns off if check command fails without reporting errors in the file being edited Dave Abrahams
@ 2017-11-03 11:51 ` João Távora
  2017-11-03 13:21   ` Eli Zaretskii
  2017-11-04 17:41   ` Dave Abrahams
  0 siblings, 2 replies; 4+ messages in thread
From: João Távora @ 2017-11-03 11:51 UTC (permalink / raw)
  To: Dave Abrahams; +Cc: 24623

Dave Abrahams <dave@boostpro.com> writes:

> In these lines from flymake-post-syntax-check:
>
>       (if (and (equal 0 err-count) (equal 0 warn-count))
>           (if (equal 0 exit-status)
>               (flymake-report-status "" "") ; PASSED
>             (if (not flymake-check-was-interrupted)
>                 (flymake-report-fatal-status "CFGERR"
>                                              (format "Configuration error has occurred while running %s" command))
>               (flymake-report-status nil ""))) ; "STOPPED"
>         (flymake-report-status (format "%d/%d" err-count warn-count) "")))))
>
> err-count and warn-count are the count of errors detected *in the file
> being edited*.  My syntax check command must consider a whole batch of
> files at once, and sometimes those other files have errors in them.
> That should not disable syntax checking in the current file, but flymake
> has this behavior unconditionally, and there's no way to turn it off.

[Eli, I’m CC’ing you since I think this bug can be marked "wontfix" or
equivalent]

Hello Dave and sorry for the extremely late reply to this bug.

This is easy to reproduce with GCC as a checker tool when checking a .h
file with no errors but included by a .c file with some errors.

I just wanted to note, if you haven’t noticed already, that Flymake has
been redesigned in the upcoming Emacs 26 and the functionality you refer
to is now considered obsolete.

Nevertheless, it is still supported and lives in a so called "legacy
backend". Your particular problem also popped up for me testing. My
solution would be to invoke your syntax checker tool in a way that the
invocation univocally returns 0, like having this in a Makefile:

syntax-check:
	mytool $(CHK_SOURCES) || true

But there are new much better ways to configure Flymake with your syntax
checker. They are described in the Flymake Info manual, which also
broadly describes the redesign effort). You can read this manual with
M-x info in the upcoming Emacs version (or one of the already available
pretests thereof).

Given the workaround, I don’t there’s much reason to fix this.

João






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

* bug#24623: 25.1; Flymake turns off if check command fails without reporting errors in the file being edited
  2017-11-03 11:51 ` João Távora
@ 2017-11-03 13:21   ` Eli Zaretskii
  2017-11-04 17:41   ` Dave Abrahams
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2017-11-03 13:21 UTC (permalink / raw)
  To: João Távora; +Cc: dave, 24623

> From: joaotavora@gmail.com (João Távora)
> Cc: 24623@debbugs.gnu.org, eliz@gnu.org
> Date: Fri, 03 Nov 2017 11:51:23 +0000
> 
> [Eli, I’m CC’ing you since I think this bug can be marked "wontfix" or
> equivalent]

There's no need to CC me, because I read all the messages that the
issue tracker reflects to the bug-gnu-emacs mailing list.





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

* bug#24623: 25.1; Flymake turns off if check command fails without reporting errors in the file being edited
  2017-11-03 11:51 ` João Távora
  2017-11-03 13:21   ` Eli Zaretskii
@ 2017-11-04 17:41   ` Dave Abrahams
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Abrahams @ 2017-11-04 17:41 UTC (permalink / raw)
  To: João Távora; +Cc: 24623



> On Nov 3, 2017, at 4:51 AM, João Távora <joaotavora@gmail.com> wrote:
> 
> Dave Abrahams <dave@boostpro.com> writes:
> 
>> In these lines from flymake-post-syntax-check:
>> 
>>      (if (and (equal 0 err-count) (equal 0 warn-count))
>>          (if (equal 0 exit-status)
>>              (flymake-report-status "" "") ; PASSED
>>            (if (not flymake-check-was-interrupted)
>>                (flymake-report-fatal-status "CFGERR"
>>                                             (format "Configuration error has occurred while running %s" command))
>>              (flymake-report-status nil ""))) ; "STOPPED"
>>        (flymake-report-status (format "%d/%d" err-count warn-count) "")))))
>> 
>> err-count and warn-count are the count of errors detected *in the file
>> being edited*.  My syntax check command must consider a whole batch of
>> files at once, and sometimes those other files have errors in them.
>> That should not disable syntax checking in the current file, but flymake
>> has this behavior unconditionally, and there's no way to turn it off.
> 
> [Eli, I’m CC’ing you since I think this bug can be marked "wontfix" or
> equivalent]
> 
> Hello Dave and sorry for the extremely late reply to this bug.
> 
> This is easy to reproduce with GCC as a checker tool when checking a .h
> file with no errors but included by a .c file with some errors.
> 
> I just wanted to note, if you haven’t noticed already, that Flymake has
> been redesigned in the upcoming Emacs 26 and the functionality you refer
> to is now considered obsolete.
> 
> Nevertheless, it is still supported and lives in a so called "legacy
> backend". Your particular problem also popped up for me testing. My
> solution would be to invoke your syntax checker tool in a way that the
> invocation univocally returns 0, like having this in a Makefile:
> 
> syntax-check:
> 	mytool $(CHK_SOURCES) || true
> 
> But there are new much better ways to configure Flymake with your syntax
> checker. They are described in the Flymake Info manual, which also
> broadly describes the redesign effort). You can read this manual with
> M-x info in the upcoming Emacs version (or one of the already available
> pretests thereof).
> 
> Given the workaround, I don’t there’s much reason to fix this.

Hadn't noticed, thanks.  I'll have to upgrade my emacs I guess.  Thanks for the update.




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

end of thread, other threads:[~2017-11-04 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-04 17:47 bug#24623: 25.1; Flymake turns off if check command fails without reporting errors in the file being edited Dave Abrahams
2017-11-03 11:51 ` João Távora
2017-11-03 13:21   ` Eli Zaretskii
2017-11-04 17:41   ` Dave Abrahams

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).