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
DartAnalyzer stops working from time to time / autocompletion in IntelliJ fails #24812
Comments
Another point is that Analysis-Server doesn't cache anything - it always starts from zero. In my case it takes about 30 to 40mins until it has scanned my project. |
I took the "turn it off / turn it on" approach and restarted the IDE. After a while autocompletion works again. Maybe I ran into this problem: https://youtrack.jetbrains.com/issue/WEB-18833 - don't know but as said - it's very frustrating at the moment to work with Dart/IntelliJ |
According to the screenshot semantic highlighting works in the file on the right side. It means that you didn't have WEB-18833 problem, otherwise you'd have nothing at all working for the whole project (and no 'Dart Analysis' progress on startup). |
@MikeMitterer What version of Dart are you on? 1.13 dev, right? Would you please include the full output of We've made some BIG fixes in the last couple of dev releases – |
Dart VM version: 1.13.0-dev.7.6 (Fri Oct 30 15:14:38 2015) on "macos_x64" |
What specifically does not work? We need to have more information. You can enable it in IDEA by following these steps:
|
As I am aware of it's "just" code completion. Here it's almost 11pm. I'll send the log tomorrow. Thanks so far! |
Mail is on the way to you - please keep me informed what you found out. |
Unfortunately the logs are all after restart on IDEA, so we don't see the reason WHY it was started. |
I also noticed that DAS uses a lot of heap. Unfortunately until the VM team (@johnmccutchan @iposva-google @rmacnak-google) fixes #24749 we're basically blind and cannot analyze heap problems we don't see on our computers. |
OK, I've added #com.jetbrains.lang.dart.analyzer to Help | Configure Debug Log Settings and restarted the IDE... |
According to Mike's screenshot code completion is not the only thing that doesn't work for the file on the left side. Navigation to declaration doesn't work as well. I guess for each file either all or none DAS-driven features work. |
@MikeMitterer Hey, I've got this issue as well. It used to drive me crazy as well. But now instead of restarting intellij, if you have the latest version of the plugin, you can click on the "Reanalyze sources" button in the analyzer tab. This will get your autocompletion + analyzing stuff to work again. Hope this helps you Although, this is just a band-aid on a real problem. The analyzer keeps crashing for some reason, and it has been happening for several releases to me. For documentation's sake, I'm using Arch Linux x64, with IntelliJ 15 (used to happen on 14 as well)
|
Tagging as an 1.13 candidate. |
@MikeMitterer sent the log that shows the following exceptions.
|
It seems that it both cases we have a We attempt to create a new instance of sdk/pkg/analyzer/lib/src/task/dart.dart Line 4603 in 4db460e
null as libraryElement . So unitElement.library is null . So, this UnitElement does not have an enclosing LibraryElement .
|
Is this a blocking issue for releasing 1.13 stable? Do we have an estimate on a fix for this? Until we hear otherwise, we can't release 1.13. |
Any updates on this issue? |
We have not been able to reproduce the exceptions, but we did find one problem that might account for part of the slowness being reported by our users. @MikeMitterer a couple of questions. Have you re-run |
Almost all of my projects have packages AND .packages. Most of my doc-folders are empty. |
… version switch. R=brianwilkerson@google.com BUG= #24812 Review URL: https://codereview.chromium.org/1441013003 .
We have fixed the problem that caused @MikeMitterer exceptions in a21e3a5. This requires more testing with this fix applied. |
@MikeMitterer , could you try this build http://gsdview.appspot.com/dart-archive/channels/dev/raw/1.13.0-dev.7.12/sdk/. It should fix the issues you were seeing with the -dev.7.11 sdk. |
@MikeMitterer Did you try deleting the packages directories? If so, was there any change in performance? |
@keertip Thanks I'll give it a try tomorrow! @bwilkerson I can't delete all the packages. I thought you gonna come up with a final solution for the package problem - removing all of them is not the best one... what, and in my case that's the case, if one package referenz assets from another package? Then you need at least one package-folder in web or in project-root... To be more precise: sample.scss in dart-application X: @import "packages/mdl/assets/styles/animation/animation"; |
Sorry, I guess I was unclear. The |
Oh, I just re-read you question and I think I understand better what you were asking. The VM also understands @munificent Can you confirm this? |
The sass transformer calls out to the sass command line tool which doesn't know about Dart and the |
That's a problem. My understanding is that both the directory and the file are produced by default in 1.13. In 1.14 and later only the file will be produced by default. In 1.14 you'll still be able to explicitly ask I think the transformer will need to be updated to follow the package spec DEP (https://github.com/lrhn/dep-pkgspec). |
I created an issue for the transformer (dart-league/dart-sass#1) in case they were not aware of the changes that are coming. |
You can update the transformers, but that won't happen for non-Dart related 3rd party tools like the sass tool called by the transformer. That's a known problem. I haven't seen any discussions how to deal with such tools yet though. |
It is possible for the SASS transformer to loop back to barback when it wants to load and resolve Otherwise, yes, when the "packages" directory goes away, tools that presume it's there will not be in a happy place. We don't anticipate getting rid of that directory for a while, though, so there should be time to move tools off of it. |
I tried the new version with latest IJ Dart plugin and it's really much faster now - Cool! But there are still a few issues:
Here you can see the whole process: @scheglov I've sent you the log via mail... [Update] |
@MikeMitterer Excellent! I'm glad we're starting to make progress. We'll take a look at the log files and see what we can learn. |
There are two reasons why in your video it too 4 minutes:
Usually DAS uses The easy solution would be to exclude these templates from analysis.
The crash (actually not a crash - just a non-fatal exception) must be easy to fix. |
The fix for the exception. |
Sorry - but I have another one. [Update] analyzer:
exclude:
- 'samples/**' |
We're not. You're being extremely helpful, and we're grateful. What was the error message associated with those two uses of the class name? |
@MikeMitterer, you see the error because your
This mean that when you open a Dart file in a sample, it is analyzed as an independent file, not a part of the |
Why is it analyzed at all, when it is excluded? |
Good point, @zoechi. |
Yes, a separate issue for |
I worked quite some time and can confirm that without the |
@scheglov It's to bad but there is still somewhere a bug in how IJ or DA handles analysis / reanalyzing. I've sent you the log via mail Here the SS after I stopped recording - (DA is still analyzing...) |
@MikeMitterer, can you please open a new issue(s) to track any remaining problems? I'd like to close this one out so that we can easier tell what was resolved, and what is still not working. |
@MikeMitterer It might be the same problem as before - we spend about This is something we can optimize in DAS after |
I know the subject sound weird but thats how it is. The IDEA Team is really helpful but I'm almost sure this is not their fault but it's a "Analyzer Server problem" https://youtrack.jetbrains.com/issue/WEB-18020
THIS REALLY DRIVES ME CRAZY
I know my project is big and has quite a few modules but Dart is almost 4 years old, I'm working with one of the best IDEs and at the moment it's like working with Notepad+syntax highlighting.
It costs me about one hour per day restarting the IDE, waiting for DartAnalyzer, restarting again, writing ISSUE-reports and so on. It's like being in a Beta-Program...
The text was updated successfully, but these errors were encountered: