Haskell-ide-engine: diagnostics different on save vs on edit

Created on 18 Sep 2018  路  7Comments  路  Source: haskell/haskell-ide-engine

Most helpful comment

I鈥檒l did a bit further then and see if I can make this situation better.

All 7 comments

@alanz should we also trigger diagnostics in save?

For me this would be handy, as sometimes neovim gets stuck in an old diagnostics state (seems to be missing messages) and saving to refresh the state would be an easy win.

@lorenzo we already do trigger diagnostics on save. But we have additional providers that work only on save, such as liquid haskell, and perhaps this is the cause of the unexpected behaviour.

I鈥檒l did a bit further then and see if I can make this situation better.

I'd like to +1 this and chime in since this is probably the biggest issue that's stopping me from going all in on HIE.

It seems like nearly every time I type something into the editor on VSC, it doesn't capture the last few keystrokes, which will almost always result in a compile error that does NOT go away when hitting the save key. From comments here, it seems like this is not specific to VSC. For example:
screen shot 2018-11-18 at 1 44 35 pm
When typing in "initial", it seemed like it didn't capture "ial", and for some reason doesn't auto-correct over time or with a save. It will stay like this until I'm forced to change something in the file, which for me is typically adding and removing a space on an empty line. @alanz is there some setting I'm missing that will force a ghcmod refresh on save?

Edit: related, is there some way to disable ghcmod errors UNTIL a save? I think in most situations I don't really care about seeing ghcmod errors until I actually hit save, which would basically be like saying "okay I'm done, check my work".

I can confirm that a whole team of users see what @cah6 is mentioning. Disabling ghcmod checks until a save would be fantastic.

Some pointers on where to go with this from IRC:

  • [ ] Set up test cases
  • [x] Look at disabling debouncing on saves
  • [ ] Investigate the fact that save requests are not versioned

http://hackage.haskell.org/package/haskell-lsp-types-0.8.0.1/docs/Language-Haskell-LSP-Types.html#t:DidSaveTextDocumentParams
http://hackage.haskell.org/package/haskell-lsp-types-0.8.0.1/docs/Language-Haskell-LSP-Types.html#t:DidChangeTextDocumentParams

A possible remedy is at https://github.com/alanz/haskell-ide-engine/tree/issue-839

I will look at it more tomorrow, unless @bubba does now.

Was this page helpful?
0 / 5 - 0 ratings