Closed wclr closed 2 years ago
Right, there are 2 categories of failed build where the build tool exists but doesn't provide those JSON errors from the compiler
And the error really does point more strongly to the 1st one than it should.
So the actual error is in the output panel, maybe a possibly truncated version in the notification could be good. Could actually provide an action to show the output panel to see the full error.
Now that the compiler outputs the JSON output to stdout, stderr on an error return code should be a better approximation of a message to show.
Could actually provide an action to show the output panel to see the full error.
I believe such things editor-specific things are not available through LSP api. It could be handled specially for vscode though, it could be another method of displaying the message (e.g., a dialog window).
You're right, I was mistakenly looking at the vscode extension API rather than the LSP spec, there is no output channel concept, just window/logMessage
. It would need to be a custom message and some config/capability to determine if the action should be available - not worth it.
Made a change to simply output (truncated) stderr output on error, if no JSON output is found.
Errors that result in something useful on stderr output, but still produce JSON from the compiler build, can't really be distinguished for a regular failed build, so I can't see any improvement there.
Any specific examples to improve welcome, at least the original case is better now.
May output such error message:
Due to this LS outputs not very informative notification:
I believe for DX it would be better to output particular errors produced by the build tool.
How do you think it would be better to handle it? Some small problems I see here:
strip-ansi
npm package.