Silently fails on hlint version 2 or greater
Closed this issue · 7 comments
Running cabal install hlint
currently downloads hlint version 2.
This extension fails to parse the output of hlint 2, but doesn't indicate any errors to the user. In development tools it simply outputs that the hlint
command ran successfully but produced no output. Nothing is printed in the main "Problems" window. See #18 for more specifics.
IMHO, vscode-haskell-linter
should:
- At minimum, document that it is not currently compatible with hlint 2
- Ideally, be updated to support hlint 2
- In the meantime, indicate some kind of error when running hlint 2
Until this issue is addressed, users can downgrade via cabal install hlint-1.9.41
.
Thanks for getting to the bottom of the issue! I don't know how quickly I'll be able to get to a patch, but it might be as simple as updating the regex that parses the output to match the new format.
If you or anybody else is interested in submitting a pull request I'll review it.
Ideally hlint1 would also be supported, hlint -v can be called when the extension activates to determine which regex can be used.
I may take a look sometime soonish. It's likely a small edit as you say, plus it's good motivation for me to peek a little closer at how VSC extensions are built.
hlint 2 removed standard input support, i.e. you can no longer pass "-" to make hlint read from standard input, see ndmitchell/hlint#342
HLint 2.0.8 adds back the stdin support, so perhaps upgrading to that version will fix the issues?
Glad to hear it @ndmitchell — I'll check tomorrow.
Assuming it's working, should we simply close this issue, @hoovercj? Or document that this project is incompatible with HLint 2.0.0–2.0.7? I'm assuming that without the STDIN support it will be impossible to patch vscode-haskell-linter
to actually work with those versions, but I haven't actually done any digging since the original conversation.
Now it works perfectly with HLint v2.1.11. I think the issue can be closed.