guillermooo / dart-sublime-bundle

Sublime Text 3 Dart Package
BSD 3-Clause "New" or "Revised" License
265 stars 42 forks source link

Dart analyzer not working #546

Closed enyo closed 9 years ago

enyo commented 9 years ago

I am using Sublime Build 3083 with Dart Sublime v1.5 and get no analyzer info.

Syntax highlighting works fine.

In the sublime console I get:

Dart: Analyzer started.
Emmet: No need to update PyV8
Dart: Analysis Server version: 1.6.0

and in my config I have "dart_enable_analysis_server": true

(I have a few other packages installed, all not dart related.)

Please tell me how to provide additional debug information.

guillermooo commented 9 years ago

Platform?

enyo commented 9 years ago

Oh sorry OS X 10.11 El Capitan

enyo commented 9 years ago
$ dart --version
Dart VM version: 1.10.1 (Mon May 11 11:03:28 2015) on "macos_x64"
enyo commented 9 years ago

I just saw that I had many of those processes spawned:

enyo             8077 101.0  0.8  2643420 125908   ??  R     3:54PM   0:12.61 /Applications/dart/dart-sdk/bin/dart /Applications/dart/dart-sdk/bin/snapshots/analysis_server.dart.snapshot --sdk=/Applications/dart/dart-sdk/

It uses 100% of my CPU, and restarting sublime just spawns a new one.

guillermooo commented 9 years ago

Could you please describe step by step what you do to start ST and edit your file?

enyo commented 9 years ago

Nothing out of the ordinary really. Open Sublime Text from dock, which automatically opens the project I had opened before. So I immediately see a .dart file and the process is already spawned.

I can of course try different scenarios if you tell me which ones would be useful to you.

enyo commented 9 years ago

Ok. So I tried debugging it a bit. It works fine if I simply create a single dart file and load that. I also opened another project where it worked. So it has something to do with my project setup that causes the analyzer to freeze. I will try to continue finding the problem. It is probably more due to the analyzer having a problem than your bundle I guess.

But I wonder: would it be easy to implement a health check for the analyzer, and at least inform the user about it being unresponsive?

enyo commented 9 years ago

Ok. I am still not quite sure what the actual problem is, but it's an analyzer error. I tried rebuilding my packages and cleaning up the dependencies, but apparently there were some bad symlinks in some of my web/**/packages/ folders, that caused the dart analyzer to freeze.

I removed all of them, and rebuilt the dependencies, and now it works great.