-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HLS suggests disable deferred-type-errors
(needed for type error diagnostics)
#2032
Comments
Thanks for your bug report. Could we got acess to the project to try to reproduce the problem? share it in github would be fine |
@jneira I’d rather not share it just yet, but I’ll see if I can upload another project which shows this issue. |
I have solved the mystery — this turned out to not be a bug at all! I was copying and pasting bits from my project
…which of course disabled all type errors in the module. Once I removed it, I suddenly started getting type errors again. And I believe I know why this line got there in the first place. Whenever I get a warning, in the code actions HLS regularly allows me to disable that warning. Type errors are reported through I therefore suggest that, for this warning only, HLS should stop suggesting disabling |
Thanks, agree in is not a good idea suggest that, as you usually dont want to disable errors (ey, it is "if compile work" haskell 😉 ) |
deferred-type-errors
(needed for type error diagnostics)
deferred-type-errors
(needed for type error diagnostics)deferred-type-errors
(needed for type error diagnostics)
Yeah, I've been meaning to open an issue about this for a while, having initially added the functionality in #1235. It should be easy enough to add a special case to that code, to ignore these warnings. Or if there are other warnings "enabled by hls itself", as @jneira says, then maybe we can do something more general. |
@georgefst It would be nice to do something more general if there are any other warnings added by HLS, but if not I see no reason to not have a special case for |
Your environment
Which OS do you use: Windows
Which lsp-client do you use: emacs
Describe your project: stack.yaml
Contents of
hie.yaml
:Steps to reproduce
Deliberately introduce an obvious type error (e.g. by changing a signature to
()
). Then runhaskell-language-server typecheck
, or typecheck the module in an editor.Expected behaviour
The type error should be reported.
Actual behaviour
No type error is reported. (Interestingly, all other errors seem to be reported correctly.)
Include debug information
Debug output:
(NB. The path to the project is rather long, so for concision I have replaced it with the text
<project directory>
.)The text was updated successfully, but these errors were encountered: