ale icon indicating copy to clipboard operation
ale copied to clipboard

Deprecate `flow` linter

Open mroch opened this issue 6 years ago • 3 comments
trafficstars

Hi, I am from the Flow team and I am contemplating deprecating our non-LSP APIs. I wanted to discuss deprecating the flow ALE linter in favor of the flow-language-server linter.

I have to admit that I'm not a regular vim user, so my experience with ALE is very limited. But as far as I can tell, flow-language-server is a superset of flow since both handle diagnostics.

I think it'd be great if the two linters merged, so that flow used the LSP (perhaps only for newer Flow versions?) and flow-language-server got deprecated. flow is the better, more consistent name IMO.

If there are any issues with our LSP implementation that make people prefer the flow linter, I'd like to resolve those ASAP. The LSP is our primary API going forward.

mroch avatar Jul 18 '19 13:07 mroch

I am looking into https://github.com/facebook/flow/issues/7009.

mroch avatar Jul 18 '19 13:07 mroch

I think I mentioned this somewhere on GitHub previously, but I can't remember where I said it. What should happen here is that ALE should check the flow version and switch between two linter definitions, one for the language server, and one for the old linter. Then ALE can automatically choose the language server when it's stable enough, and the older linter when the language server isn't available. The easiest way to accomplish this is to define two flow linters with different names with version checks where they disable themselves if the the other counterpart linter is enabled and version is too low or high.

" This could be in a `flow` linter.
if ale#semver#GTE(a:version, [1, 2, 3]) && l:flow_ls_enabled
    return ''
endif

" ...

" This could be in a `flow_ls` linter.
if !ale#semver#GTE(a:version, [1, 2, 3]) && l:old_flow_enabled
    return ''
endif

ale#linter#Get is the best way to get the list of enabled linters.

w0rp avatar Jul 30 '19 07:07 w0rp

Note that flow-language-server is also deprecated. Flow itself now has a language server by running flow lsp.

https://github.com/facebookarchive/flow-language-server

hsanson avatar Aug 06 '21 09:08 hsanson