-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Compiler diagnostics originating from typesystem are incomplete #13646
Comments
Thank you! The message is not truncated, we don't include the snippet because we expect you to show it. I think however it can be confusing. Perhaps we should end the message by saying "typing violation found"? We could compute the spam though, that would benefit both the console warning and the terminal one. And what do you expect to be in detail? |
I don't think I follow. This is clearly different than
Other errors have exception in detail. I would expect to find some structured info about the type problem:
In LSP Diagnostic besides the main position/span ( |
I think that's rather a flaw in TokenMissingError. I don't think we include it anywhere else. If you do
Got it. I will see what we can expose. Perhaps we can expose the traces. |
No, only some of them do. The changes to include snippets were introduced in 1.16. In fact they do look ugly if the UI displaying it is not using a monospaced font (and there is no markdown support in diagnostic messages but that's VSCode issue microsoft/vscode#54272) |
For completeness, the reason why syntax error, token missing error, etc include the snippets is because they are exceptions. You can probably intercept those exceptions and render something without the snippets if desired. |
Elixir and Erlang/OTP versions
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Elixir 1.17.0-rc.0 (db89cbf) (compiled with Erlang/OTP 27)
Operating system
any
Current behavior
Given this code
The emitted diagnostic has truncated message and no details
Whereas the same code emits this in terminal
Expected behavior
Message not truncated, detail filled, possibly span filled
The text was updated successfully, but these errors were encountered: