Skip to content

Dart reporting incorrect code while code is correct (server overlays get out of sync with editor when analyzer plugins are used) #3761

@Cellaryllis

Description

@Cellaryllis

Describe the bug
We have noticed that since about a week or two ago that dart is reporting code errors that don't exist, of code that doesn't exist.
The issue doesn't present itself right after a new boot of Visual Studio Code, however typically after 5-10 minutes. The bug prevents us from hot reloading because of "errors in the code" that aren't there.
It will also stop properly suggesting code as it seems to think that there is different code in the file than is visible on the screen.

When opening the file in another text editor, we see the same code as we see in vscode, so it's not saving the file wrong.
Typically closing the file and re-opening the file will fix this issue until you make one more code edit. You will need to restart vscode in order to fix the issue completely.

In the image you can see we have "aboutSecurity", but Dart thinks it is saying "aboutSecurityaboutSecurity...."
Please let me know what additional information I should provide in order to debug this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Edit a file
  2. After a while of editing the file, the behavior starts occurring

Expected behavior
Dart not reporting errors of code that doesn't exist

Screenshots
image

Versions (please complete the following information):

  • VS Code version: 1.63.2
  • Dart extension version: 3.29.0
  • Dart/Flutter SDK version: Flutter 2.8.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions