Description
Describe the problem
In order to reduce the resource usage related to the language server features, the library discovery process is no longer triggered after every change to the sketch code (#1107).
This change means that the contents of libraries only become known to the language server after a significant user action (opening a sketch, changing the board selection, compiling) triggers the library discovery process.
Sketch code which relies on the library would receive spurious problem detections from the language server before that time. For this reason, an advanced setting has been added to control the problem detection feature. It defaults to being off.
🐛 Problem detection is done by the IDE even when it should be disabled by the setting.
To reproduce
- Open the "Command Palette" (Ctrl/⌘+Shift+P).
- Select the "Preferences: Open Settings (UI)" command from the "Command Palette".
The "Preferences" tab will now open in the editor panel. - In the "Search Settings" field, type
arduino.language.realTimeDiagnostics
- Uncheck the checkbox under the "Arduino › Language: Real Time Diagnostics" section if it is checked.
- Select Tools > Board > Arduino AVR Boards > Arduino Uno from the Arduino IDE menus.
ⓘ The issue will occur with any board selected that has language server support. - Create a sketch that would produce a problem detection if the feature was enabled:
void setup() { foobar } void loop() {}
🐛 A problem "squiggle" appears even though the setting should have disabled it:
Expected behavior
Problem detection is only done when the arduino.language.realTimeDiagnostics
setting is enabled.
Arduino IDE version
2.0.0-rc8-snapshot-8ad10b5
Operating system
Windows
Operating system version
10
Additional context
I bisected the issue to 8ad10b5 (it does not occur when using the build from the previous commit fe31d15)
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details