arduino-language-server does not error on failed compilation from arduino-cli #79
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Bug Report
Current behavior
When starting the language server (I'm using
neovim
's LSP client), the invocation to thearduino-cli
tool for a compilation step before callingclangd
can error out without crashing the language server. This causes an ambiguous behavior where the language server appears to be operating and waiting onclangd
, but has failed a necessary step to invoke the server.Expected behavior
I would expect the language server to crash on failure to pre-process the
ino
files intocpp
files and pass off toclangd
. It might even make sense to show an error message here that suggests there's an issue with thearduino-cli
involvement and to investigate there. For me, I had not installed the the platform core for the board.The arduino-cli responds with a JSON object noting that the compiler has failed. I think on
"success": false
the LS should exit and display a message.Additionally (this should be an issue on the
arduino-cli
project), it would be nice if the error message from thearduino-cli
tool made it to the LS. All the LS receives back is:however when compiling the code manually (not letting the LS do it for me), the error message is much more clear:
Environment
64a0e42a7a3d713629d3066d7555fb32cf19c3ec
arduino-cli version
):arduino-cli alpha Version: 0.18.3 Commit: d710b642 Date: 2021-05-14T12:36:58Z
Ubuntu 20.04.1 LTS
Additional context
The text was updated successfully, but these errors were encountered: