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

Dart analyzer and Intellij IDEA is once in a while unusable - and Intellij IDEA just becomes nothing but a raw text editor #45723

Closed
fzyzcjy opened this issue Apr 16, 2021 · 5 comments
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. area-intellij Tracking issues for the Dart IntelliJ plugin. P2 A bug or feature request we're likely to work on type-performance Issue relates to performance or code size

Comments

@fzyzcjy
Copy link
Contributor

fzyzcjy commented Apr 16, 2021

Hi thanks for the lib! But such behavior of dart analyzer & intellij idea is driving me crazy...

I write Flutter program using Intellij IDEA (with dart & flutter plugins), but the experience is very painful and even unuseable recently :( Let me try to explain it in detail in order to seek the root cause easier:

Firstly, once in a while, the following happens: The syntax highlight disappeaers (every word is white except for keywords; but you know, normally there are many colors, such as purple for fields). The jumping does not work completely. For example, originally I can cmd+B on a class/method name to jump to the definition of the class/method, but now I cannot. In short, almost everything does not work and Intellij IDEA just work as if it is a pure text editor!

Example screenshot:

image

Secondly, I also observe that, when the things above happen, the code formatter also behaves very strangely. When I trigger "format the file", it takes many seconds, and the finally formatted file is strange, in a format that is contrary to the normal format required by Flutter. I guess it is like formatting just partially, but I am not sure. For example, in the screenshot above, I originally added just one or two lines of code, and format it, and it looks like what is in the screenshot. You know, the standard formatting is completely not like this.

Here is another example of strange formatting. Left hand side is the code formatted when flutter behaves normally; right hand side is formatted when it is strange.

image

image

image

Thirdly, such case sometimes last for a few minutes, sometimes even >15 minutes or longer. I have tried the following, but sometimes it works, sometimes it does not work:

  • exit intellij, delete the whole ~/.dartServer folder (about 1GB), restart intellij

  • wait for minutes, even for half an hour

  • try to continue programming as if intellij is a raw text editor (or worse)

  • Dart SDK Version latest

  • Whether you are using Windows, MacOSX, or Linux (if applicable) macos

  • Whether you are using Chrome, Safari, Firefox, Edge (if applicable) no, intellij

more info that is possbly related:

the analysis-driver folder is about 1GB

image

I have read: flutter/flutter-intellij#4012 , flutter/flutter-intellij#4142 , #28383 , etc

@gumbarros
Copy link

if(details != null and details.appointments.length == 1){

}

Do you have a if like this in your code? I solved the problem removing this if

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Apr 16, 2021

@gumbarros I have >10k lines of flutter code... it is not very possible to find out and remove such lines

wait a bit: you should use '&&' instead of 'and'!

@lrhn lrhn added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Apr 26, 2021
@dnkoulouris
Copy link

same problem here. dart analysis is too slow

@jcollins-g jcollins-g added P2 A bug or feature request we're likely to work on analyzer-server area-intellij Tracking issues for the Dart IntelliJ plugin. type-performance Issue relates to performance or code size labels Sep 1, 2021
@srawlins srawlins changed the title Dart analyzer and Intellij IDEA is once in a while unusable - and Intellij IDEA just becomes nothing but a raw text editor :( (I have read other issues but no help) Dart analyzer and Intellij IDEA is once in a while unusable - and Intellij IDEA just becomes nothing but a raw text editor Jun 27, 2022
@gumbarros
Copy link

@gumbarros I have >10k lines of flutter code... it is not very possible to find out and remove such lines

wait a bit: you should use '&&' instead of 'and'!

I found this notification 2 years later lol, but my IDE was crashing because of the 'and' instead of the '&&'

@mraleph
Copy link
Member

mraleph commented Oct 3, 2024

This is unactionable without reproduction of some sort.

@mraleph mraleph closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. area-intellij Tracking issues for the Dart IntelliJ plugin. P2 A bug or feature request we're likely to work on type-performance Issue relates to performance or code size
Projects
None yet
Development

No branches or pull requests

6 participants