Skip to content
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

arduino.language.realTimeDiagnostics setting has no effect #1207

Closed
3 tasks done
per1234 opened this issue Jul 18, 2022 · 0 comments · Fixed by #1208
Closed
3 tasks done

arduino.language.realTimeDiagnostics setting has no effect #1207

per1234 opened this issue Jul 18, 2022 · 0 comments · Fixed by #1208
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Jul 18, 2022

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

  1. Open the "Command Palette" (Ctrl/+Shift+P).
  2. Select the "Preferences: Open Settings (UI)" command from the "Command Palette".
    The "Preferences" tab will now open in the editor panel.
  3. In the "Search Settings" field, type arduino.language.realTimeDiagnostics
  4. Uncheck the checkbox under the "Arduino › Language: Real Time Diagnostics" section if it is checked.
  5. 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.
  6. 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:

image

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
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jul 18, 2022
kittaakos pushed a commit that referenced this issue Jul 18, 2022
kittaakos pushed a commit that referenced this issue Jul 18, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants