dart-sublime-bundle
dart-sublime-bundle copied to clipboard
After 1.4.0 analysis no longer works
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.
Thanks for the report!
Please run Dart: Check Configuration from the command palette and post the results.
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
Did the analysis service API change?
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?
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.
Btw, yes, I have restarted sublime multiple times.
- Go to Packages/Dart/sublime_plugin_lib/init.py
- Set
logging.ERROR
tologging.DEBUG
- Restart ST
- Check the output in the console
Some details after more investigation:
- This seems to be a race condition within the threads. After many restarts of sublime, the analyzer sometimes starts, sometimes it doesn't.
- I put a print of the stacktrace in the lines producing the error and I got this:
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
- Changing the logging to logging.DEBUG doesn't seem to have any useful effect. For some reason things are not written in the console.
Thanks for that. I'd wager you have other plugins that don't play well with Dart. You should see debugging output, though.
You can also try incrementing the Barrier timeout in analyzer.py and see if that helps.
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.
about the ouput, if you have multiple ST windows open, it's possible that the output will only be visible in the first one.
I confirm that the same barrier issue happens with Mac OS X.
Is this with or without other plugins installed and enabled? If other plugins are involved, could you please list which ones?
50c25b4fb5993aea51d21510a53cb35565e67ad6