From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.devel Subject: Re: maintain flymake.el Date: Mon, 16 Dec 2013 20:03:44 +0100 Message-ID: References: <87a9gdzx63.fsf@flea.lifelogs.com> <8738lsq32g.fsf@flea.lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1387220649 14463 80.91.229.3 (16 Dec 2013 19:04:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Dec 2013 19:04:09 +0000 (UTC) Cc: emacs-devel To: =?UTF-8?Q?Jan_Dj=C3=A4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 16 20:04:16 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VsdSd-0004HC-AE for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 20:04:11 +0100 Original-Received: from localhost ([::1]:57729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsdSc-00032K-U3 for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 14:04:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsdSF-0002d2-4f for emacs-devel@gnu.org; Mon, 16 Dec 2013 14:03:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsdSD-0005sM-Ft for emacs-devel@gnu.org; Mon, 16 Dec 2013 14:03:47 -0500 Original-Received: from mail-qe0-x22d.google.com ([2607:f8b0:400d:c02::22d]:47272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsdSD-0005sH-BQ for emacs-devel@gnu.org; Mon, 16 Dec 2013 14:03:45 -0500 Original-Received: by mail-qe0-f45.google.com with SMTP id 6so4267502qea.18 for ; Mon, 16 Dec 2013 11:03:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=6jktFNH5xlsppZoP5s66LTVzoC9aib6le1mozRsUJss=; b=ARzQEJCKT4KWuuj1OmHNlfy0oYybYcc8rrn05eC9aa+zRIUNv/VRSWCdg4dyB7rvOg 9fjNLWsOCz7Ne7I45TlwwoYlbmw3HTeGYzTftOQtUnCtzagMIHK1XcTlJ5UmdpLZlXlS 1GjtLI0r8BfCYqVpWlZ4QK57meK6gBFUPqd4lYfuShWn+7MuHtvv/j1xQ61eCLtKuxnm cqqMq8hQW2UAQ+TV2aBwivqzlgUiTJJ5pKPzNAXWQ4qLQQrvn4omjbby7QWeYASvZySn /FmvIVnt74FTfPz9Y+v54KteoNTEwL1TaEYRRJvwcxgtopFg8KyUBXtUaHHakrxkCEOa 2GPg== X-Received: by 10.224.88.134 with SMTP id a6mr35835158qam.73.1387220624888; Mon, 16 Dec 2013 11:03:44 -0800 (PST) Original-Received: by 10.224.207.73 with HTTP; Mon, 16 Dec 2013 11:03:44 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166504 Archived-At: 2013/12/16 Jan Dj=C3=A4rv : > Hello. > > 16 dec 2013 kl. 17:48 skrev Sebastian Wiesner : > >> 2013/12/16 Jan Dj=C3=A4rv : >>> Hello. >>> >>> 16 dec 2013 kl. 15:32 skrev Ted Zlatanov : >>> >>>> On Sun, 15 Dec 2013 19:31:46 +0100 Sebastian Wiesner wrote: >>>> >>>> SW> 2013/12/14 Sebastian Wiesner : >>>>>> I hope to finish the document by tomorrow evening, and will come bac= k >>>>>> if it's done. >>>> >>>> SW> I have completed the document now. The final version is to be fou= nd >>>> SW> at https://github.com/flycheck/flycheck/wiki/Flycheck-versus-Flyma= ke. >>>> SW> It's a thorough write-up of the differences and similarities betwe= en >>>> SW> Flycheck and Flymake, and probably also a comprehensive summary of= the >>>> SW> current issues and weaknesses in Flymake. >>>> >>>> SW> Again, it's probably unfairly biased towards Flycheck. I tried my >>>> SW> best to be neutral, but I consider Flycheck superior and think tha= t >>>> SW> the design and implementation of Flymake are somewhat broken, so I= may >>>> SW> have failed to properly account for Flymake's features and strengt= hs. >>>> SW> Please excuse this, and feel free to correct any mistakes I may ha= ve >>>> SW> made. >>>> >>>> SW> Please also suggest improvements, such as additional aspects which >>>> SW> should be covered, or report issues, such as missing details in th= e >>>> SW> comparsion. >>> >>> >>> You are missing the big think that separates flymake and flycheck. Flym= ake uses makefiles, flycheck does not. This means to be able to use flyche= ck on a large C/C++ project you have to maintain includes and defined in bo= th makefiles and as lisp variables for flycheck. Flymake does not have tha= t problem, you just add one rule for it in the makefiles, re-using all defi= nitions and include paths. >>> >>> This is really a showstopper for flycheck, even if it has some nicer GU= I stuff. It is really only usable for small projects. >> >> You can easily define your own syntax checker: >> >> (flycheck-define-checker 'c-makefile-checker >> :command ("make" "CC=3Dclang" "build") >> :error-patterns >> ((info line-start (file-name) ":" line ":" column >> ": note: " (message) line-end) >> (warning line-start (file-name) ":" line ":" column >> ": warning: " (message) line-end) >> (error line-start (file-name) ":" line ":" column >> ": " (or "fatal error" "error") ": " (message) line-end)) >> :modes (c-mode) >> :predicate (lambda () (not (buffer-modified-p))) >> > > "Easy" is in the eye of the beholder. It was easy enough for many people only unfamiliar with Emacs Lisp, as the number of contributed syntax checkers demonstrates. >> The error patterns are for Clang. Adapt the accordingly, if you are >> using a different compiler. The predicate makes sure that Flycheck >> only uses this syntax checker after the buffer was saved, because >> calling out to the build system after every change is probably not a >> good idea. >> >> Then just register the new syntax checker, and disable the built-in >> Clang checker to avoid conflicting error messages: >> >> (add-to-list 'flycheck-checkers 'c-make-file-checker) >> (setq-default flycheck-disabled-checkers '(c/c++-clang)) >> >> Feel free to copy this to your "init.el". >> >> Flycheck does not include this syntax checker for two reasons: >> >> - No one contributed it :) >> - It's hard, if not impossible, to get this right in a generic way. > > Yet that is what compile mode tries to do. So use those. I am aware of the huge number of compilers supported by compile mode, but that is not what I referred to. Compile Mode solves a difference use case, and thus is subject to other constraints than Flycheck. Most notably, it's whole purpose is to call to the complete build systems, trigger its side effects and probably wait minutes for the build to complete. The user expects that. Flycheck's concern, however, is syntax-checking, on-the-fly, and in background. As such, I can do none of the above. It cannot wait minutes for a build to complete, and it cannot risk to trigger arbitrary side effects caused by a poorly written Makefile. >> But again, you know your projects, and nothing stops you from >> definining your own syntax checker just for these projects. Try it. >> Really. It's easy. > > I won't bother as you stated that Flycheck won't be part of Emacs. I am sorry for you then, and have nothing more to say.