-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Language server results not updated after changes to installed libraries #670
Comments
With version 0.5.0-rc6 of the LS, the error disappears as soon as the user touch (makes a change) in the source code. This means that the LS needs a signal from the IDE that something changed in the global installation, so to fix this issue we need changes in the IDE. I see only two possible solutions to this problem: a) the IDE must restart the language server after each install/uninstall operation (this may be forced by running the command "Arduino: restart language server" from the command palette) b) the IDE must send a "rebuild" command in some way to the language server I personally prefer the solution "b" because restarting the language server is an expensive operation. The problem is that there is nothing like a "rebuild" command in the LSP (language server protocol). A workaround could be to produce a bougs "textDocument/didSave" event (that do not actually save anything) that in turns triggers a rebuild on the LS. |
👍 This seems to be the proper way.
FYI, it's possible to extend it, if you decide to do so in the future. Here is the Java example from VS Code to the JDT-LS:
Or with |
@kittaakos @cmaglie |
Closes #670 Signed-off-by: Akos Kitta <[email protected]>
Closes #670 Signed-off-by: Akos Kitta <[email protected]>
Describe the bug
The information provided by the Arduino language server is affected by the dependencies used by the sketch.
🐛 The lack of an update of the language server results after a change is made to the installed libraries or platforms (i.e., install, update, or uninstall) may cause them to be incorrect.
To Reproduce
🐛 The problems are still indicated even though the sketch is now valid:
If you trigger an update by reopening the sketch, changing the code, etc., the language server results update and reflect the current state of the sketch's dependencies.
Expected behavior
Language server results are updated after making any change to installed libraries via the IDE interface:
Desktop
Date: 2021-12-03T11:09:57.266Z
CLI Version: 0.20.1 [abb21449]
The text was updated successfully, but these errors were encountered: