unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Refactoring flymake.el
@ 2017-08-17 14:40 João Távora
  2017-08-17 16:57 ` John Wiegley
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: João Távora @ 2017-08-17 14:40 UTC (permalink / raw)
  To: emacs-devel; +Cc: sdl.web

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. 

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ão











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

end of thread, other threads:[~2017-08-23  3:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 14:40 Refactoring flymake.el João Távora
2017-08-17 16:57 ` John Wiegley
2017-08-17 18:08 ` Sam Steingold
2017-08-17 22:32   ` Stefan Monnier
2017-08-18 14:51     ` Sam Steingold
2017-08-18 15:11       ` Dmitry Gutov
2017-08-18 16:13         ` Sam Steingold
2017-08-18 16:25           ` Dmitry Gutov
2017-08-18 17:59             ` Sam Steingold
2017-08-18 18:52               ` Noam Postavsky
2017-08-18 19:38                 ` Sam Steingold
2017-08-18 16:26           ` Clément Pit-Claudel
2017-08-18 20:32       ` Stefan Monnier
2017-08-18 13:04 ` Dmitry Gutov
2017-08-18 19:20   ` João Távora
2017-08-19  1:59 ` Leo Liu
2017-08-21 12:50 ` Refactoring flymake.el - jumped the gun João Távora
2017-08-23  3:30   ` Stefan Monnier

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