guillermooo / dart-sublime-bundle

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

After 1.4.0 analysis no longer works #514

Open ceronman opened 9 years ago

ceronman commented 9 years ago

I get the following error in the console:

Dart: Analyzer started.
could not start RequestHandler properly
could not start ResponseHandler properly
could not start StdoutWatcher properly

I'm not sure how to get better debugging information.

guillermooo commented 9 years ago

Thanks for the report!

Please run Dart: Check Configuration from the command palette and post the results.

ceronman commented 9 years ago

Hi this is what check configuration gives me:

Sublime Text Information
================================================================================
version: 3083 (stable channel)
platform: linux
architecture: x64

Dart SDK Information
================================================================================
version: Dart VM version: 1.10.0 (Fri Apr 24 04:00:49 2015) on "linux_x64"

Dart Package Settings
================================================================================
dart_sdk_path: /opt/google/dartsdk
dart_dartium_path: /opt/google/dartium/chrome
dart_user_browsers: 
{}

Project Information
================================================================================
/home/ceronman/git/dartcade/pubspec.yaml
sethladd commented 9 years ago

Did the analysis service API change?

guillermooo commented 9 years ago

I've just tried on Lubuntu 32bit with the 1.10 SDK in a Hyper-V VM and everything is working fine, even the new tooltips.

Have you restarted ST after the upgrade?

ceronman commented 9 years ago

Weird, it was just working for me with the previous version. I was checking the Sublime console and I found the following error, maybe it could give some light:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 208, in on_load
    callback.on_load(v)
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/analyzer.py", line 140, in on_load
    g_server.send_remove_content(view)
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/analyzer.py", line 427, in send_remove_content
    block=False)
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/lib/analyzer/queue.py", line 91, in put
    super().put(data.to_json(), *args, **kwargs)
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/lib/analyzer/queue.py", line 77, in put
    super().put((priority, json.dumps(data)), block, timeout)
  File "./queue.py", line 146, in put
  File "./queue.py", line 230, in _put
TypeError: unorderable types: NoneType() < int()

I'll keep investigating to see if I can find more valuable debugging info.

ceronman commented 9 years ago

Btw, yes, I have restarted sublime multiple times.

guillermooo commented 9 years ago
ceronman commented 9 years ago

Some details after more investigation:

Traceback (most recent call last):
  File "/home/ceronman/.config/sublime-text-3/Packages/Dart/analyzer.py", line 456, in run
    self.server.ready_barrier.wait()
  File "./threading.py", line 610, in wait
  File "./threading.py", line 650, in _wait
threading.BrokenBarrierError
guillermooo commented 9 years ago

Thanks for that. I'd wager you have other plugins that don't play well with Dart. You should see debugging output, though.

guillermooo commented 9 years ago

You can also try incrementing the Barrier timeout in analyzer.py and see if that helps.

ceronman commented 9 years ago

I think I found the problem in Dart/analyzer.py the threading barrier defined in line 269:

_ready_barrier = threading.Barrier(4, timeout=5)

This barrier is timing out, maybe because of other plugins. I increased the time out and now the the analyzer works.

Also, I removed all other plugins and still don't see any logger output.

guillermooo commented 9 years ago

about the ouput, if you have multiple ST windows open, it's possible that the output will only be visible in the first one.

ceronman commented 9 years ago

I confirm that the same barrier issue happens with Mac OS X.

guillermooo commented 9 years ago

Is this with or without other plugins installed and enabled? If other plugins are involved, could you please list which ones?

guillermooo commented 9 years ago

50c25b4fb5993aea51d21510a53cb35565e67ad6