From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Newsgroups: gmane.emacs.devel Subject: Refactoring flymake.el Date: Thu, 17 Aug 2017 15:40:53 +0100 Message-ID: <87378q2r62.fsf@lolita> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1502980904 17689 195.159.176.226 (17 Aug 2017 14:41:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 17 Aug 2017 14:41:44 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: sdl.web@gmail.com To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 17 16:41:39 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diLzJ-00045m-EW for ged-emacs-devel@m.gmane.org; Thu, 17 Aug 2017 16:41:33 +0200 Original-Received: from localhost ([::1]:56310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diLzQ-0006vu-3q for ged-emacs-devel@m.gmane.org; Thu, 17 Aug 2017 10:41:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diLzG-0006v0-Ur for emacs-devel@gnu.org; Thu, 17 Aug 2017 10:41:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diLzB-00067K-UN for emacs-devel@gnu.org; Thu, 17 Aug 2017 10:41:30 -0400 Original-Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:35907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1diLzB-00067A-No for emacs-devel@gnu.org; Thu, 17 Aug 2017 10:41:25 -0400 Original-Received: by mail-wr0-x241.google.com with SMTP id f8so386339wrf.3 for ; Thu, 17 Aug 2017 07:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=29Pb/hUsDhvjLqgjVCBF/0ik/2Sj2w6A1EKsLxNgjCU=; b=uvNz8x5l3v2rZanK0IptT64q+tvIZ/veMMhO0BRQWQtfoY4I2BZ3+yJYzI5Eh7e02m zF5v4r4fNzq8AYRVxup3czWp6AeIhOun82askyB9GdE2AxQY82Wteb2mHAACzLO0ohEY aSDnQ4clQaM2ByXk/KIR9I+KNJ+w1aAjI1qombs7JeTdRs4Gq92PwxPN7ZZy7VzphN/4 +a2uVTQxvlkcI+QsFzxl5J5eYM8zg6Agyk0wd4LpiB0vQzRS8n8XIj1oW0QAgXRmNwQe eHRGzUkGsGTE3iJ8kP3r+E0XzHZjPSItzK5o18eYe5oujKW14Xq8dzTOFKQAA6AZhsQr kVTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=29Pb/hUsDhvjLqgjVCBF/0ik/2Sj2w6A1EKsLxNgjCU=; b=spwdYtVU2cNckpZhONOAdHoGzUNvXQSAK0RbkYg462JYk5saBUHI5w06reRTyxF+/Q 00ARyrJ+S/TNnPz+L5cVxTQOkyH8gDxX6dIQf4MuQhAJV8egnbFM5s2gG9pfd4+y5AnZ 9Cv9uGOahN8ipm3fQVGoIAzdQarGm7/pqCYNLnaYRfPx2Rri0pUk+GQNAxZn1bkgLXQl hcBXC72DPHnQaiLgG+TyxEyi07PBOBoxOCEDatDGsiJJd0ky+CRQ21wU38yd825b9T8M zsoJG++i4uF7NjZmk+nRLMcenzX60OSkfatxoNm2bMg4qoXjX9dDDjzqwh6ZNWpk+WLt mddw== X-Gm-Message-State: AHYfb5gG1e1Czdp0S9cElWxdoUPeBwJuD0dfNA4liS22b6Ws67jszsxD xcLvUsQQpqnZGQ== X-Received: by 10.28.13.138 with SMTP id 132mr1692171wmn.23.1502980884551; Thu, 17 Aug 2017 07:41:24 -0700 (PDT) Original-Received: from lolita.yourcompany.com (190.159.62.94.rev.vodafone.pt. [94.62.159.190]) by smtp.gmail.com with ESMTPSA id f26sm1643664wrc.67.2017.08.17.07.41.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Aug 2017 07:41:23 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:217595 Archived-At: Hello all, I've been away from this list and away from hacking for a while now, but I thought I'd return with a modest proposal for refactoring flymake.el and making it more useful to users and also third-party extensions. Specifically, I'm thinking of separating its UI and from its diagnostics-generating backends. Currently the latter rely purely on lanching external processes and examining their output, but recent experimentations with the LSP (Language Server Protocol) showed that to not always be the case. Another example is Elisp itself, which is syntax-checkable without an external tool. If you are thinking: "Hasn't flycheck.el done all those things already", the answer is probably yes, but flycheck has been around for some time and isn't in Emacs, whereas flymake.el is. Anyway, that is a whole different topic. I believe flymake.el's flaws can be fixed and it can be made as good as, if not better than, flycheck.el. I'm also committed to maintaining backward compatibility with the many flymake.el configurations out in the wild. I've already done some work, but before I invest much more, i'd like to know if there's any interest in these efforts.=20 So here's what I have so far. In a newly pushed git branch: scratch/flymake-refactor there are just two commits right now: eb34f7f5a2 Split flymake.el into flymake-proc.el and flymake-ui.el 13993c46a2 Add flymake-backends defcustom The first commit makes flymake.el into just a stub that `require's flymake-ui.el and flymake-proc.el. flymake-ui.el contains the flymake UI: the minor-mode, functions dealing with overlays, generic error containers, etc... flymake-proc.el has all the functions dealing with external processes, Makefiles, temporary mocks, and all that junk. This segregation was done very roughly, it may need some fine-tuning. The second commit adds a very simple indirection variable, a flymake-backends defcustom, which is currently only used by flymake-proc to add its backend. The only testing I've given it is interactive and the Emacs suite test case. Going forward I'm thinking of: 1. Segregating functions flymake-proc.el into their own namespace generously establishing obsoletion aliases for user-visible functions. 2. Adding an experimental emacs-lisp backend based on bytecomp.el 3. ... 4. Checking in again to see if it there's still interest :-) Jo=C3=A3o