-
Notifications
You must be signed in to change notification settings - Fork 210
Conversation
I’m confused as to how the tests are passing, since they aren’t sending any didSave notifications. |
@bubba only 2 tests where calling |
@lorenzo some of the tests do send applyedit requests though: haskell-ide-engine/test/functional/CompletionSpec.hs Lines 16 to 30 in 4c64789
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on the addition of of the config option, but I'm not so sure on making onSave the default. I can imagine this would cause confusion for people upgrading when diagnostics are no longer being returned immediately. Are there any other language servers that only return on save by default? Most of the builtin VS code language servers (JS/python etc) seem to run diagnostics on change.
Hopefully with the upcoming changes the BIOS and the new .hie files, the latency with running and fetching diagnostics won't be so bad.
All of the language servers I used for work do it on save: Golang, The problem is not the latency, which is also annoying, but the constant showing of errors as I type. Edit: I just realised that I changed the python's lang server behaviour for the exact same problem. Way too much noise as I typed. |
Right, but the test is not doing any assertions on the diagnostics after changing the test. The only thing that I changed here is running diagnostics, the rest is kept unchanged. |
I agree that the default should be to preserve the current behaviour, rather than only generating diagnostics on save. |
I do agree though that we should definitely support this workflow in some form. I can also imagine a wide variety of scenarios such as having really large modules which take a long time to typecheck where on save behaviour is probably preferred. (Accidentally closed this, please ignore!) |
Ok, seems there does not seem to be lots of support for making this the default, I'll make it a configuration option only and revert to the previous default. |
Part of the way to fixing #522
previous calls had defaults scattered all over the place and they often were contradictory.
e7f71b7
to
7cd1ab8
Compare
This introduces a behaviour change in that hie will only run diagnostics on a file after it has been open and saved, unless the user hasn't manually configured the client to run diagnostics on chages.
I have found that running diagnostics as I type creates too much noise in my editor as more often than not I'm in a broken state. Additionally, this it makes HIE appear that it runs faster.
diagnosticsOnChange
client config value