Compiler produces a mess after each code change
See original GitHub issueDescribe the bug On both my development machines the Flutter compiler seems to get confused after I change even just small pieces of code:
Suggestions appear multiple times, variable and function names get completely messed up, error under-lining is totally wrong and in general, it finds dozens of errors where there is none. Often it helps to save the file, close and re-open it. Until the next change is done.
To Reproduce Steps to reproduce the behavior:
- Open an existing project in VS Code.
- Make a change to the code.
- Compiler gets confused
Versions (please complete the following information):
- VS Code version: v1.63.2
- Dart extension version: v3.29.0
- Dart/Flutter SDK version:
$ flutter doctor -v
[√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.19043.1348], locale de-CH)
• Flutter version 2.5.3 at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (2 months ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
• Pub download mirror https://pub.dev
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\SebastianBuechler\AppData\Local\Android\sdk
• Platform android-31, build-tools 30.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] VS Code (version 1.63.2)
• VS Code at C:\Users\SebastianBuechler\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.29.0
[√] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.110
• No issues found!
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Compiler produces a mess after each code change #94122
Suggestions appear multiple times, variable and function names get completely messed up, error under-lining is totally wrong and in general, it ...
Read more >On Compiler Error Messages: What They Say and ... - Hindawi
Programmers often encounter cryptic compiler error messages that are difficult to understand and thus difficult to resolve.
Read more >Eight C++ programming mistakes the compiler won't catch
Eight C++ programming mistakes the compiler won't catch · 1) Uninitialized variables · 2) Integer division · 3) = vs == · 4)...
Read more >1.1. Compiling and Executing Programs
When a non-header file is compiled, we get an object-code file, usually ending in “ .o ”. These are binary files that are...
Read more >Why do compilers produce assembly code?
Small changes in machine code are easier to accomodate by changing the assembler rather than the code generator. Share.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, interesting. Perhaps something in the newer version alters the timing slightly that makes the race condition less likely to occur. You might be lucky and not see it again, or it might show up again until you ahve the fix above (but that should eliminate it completely). Let me know if you do hit issues again anyway. Thanks!
I believe it won’t, but if it does (and you’re ensured you’re on the latest
beta
) branch, please do let me know so I can look into why. Thanks!